From: sungwook79.park Date: Thu, 10 Aug 2023 07:39:24 +0000 (+0900) Subject: Add warning log to deprecated API X-Git-Tag: submit/tizen/20230817.044630~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F00%2F297100%2F1;p=platform%2Fcore%2Fapi%2Fgesture.git Add warning log to deprecated API Change-Id: Ib5c835ac89ccceff0674b9debf904a903633f44e Signed-off-by: sungwook79.park --- diff --git a/client/gesture.c b/client/gesture.c index c7f177f..951e5b8 100644 --- a/client/gesture.c +++ b/client/gesture.c @@ -124,6 +124,7 @@ static int _gesture_check_privilege() EXPORT_API int hand_gesture_create(hand_gesture_h *handle) { + LOGW("DEPRECATION WARNING: hand_gesture_create() is deprecated and will be removed from next release."); LOGD("hand_gesture_create"); CHECK_GESTURE_FEATURE(); @@ -170,6 +171,7 @@ EXPORT_API int hand_gesture_create(hand_gesture_h *handle) EXPORT_API int hand_gesture_destroy(hand_gesture_h handle) { + LOGW("DEPRECATION WARNING: hand_gesture_destroy() is deprecated and will be removed from next release."); LOGD("hand_gesture_destroy"); CHECK_GESTURE_FEATURE(); @@ -195,6 +197,7 @@ EXPORT_API int hand_gesture_destroy(hand_gesture_h handle) EXPORT_API int hand_gesture_is_supported_type(hand_gesture_h handle, hand_gesture_type_e gesture, bool* supported) { + LOGW("DEPRECATION WARNING: hand_gesture_is_supported_type() is deprecated and will be removed from next release."); LOGD("hand_gesture_is_supported_type"); CHECK_GESTURE_FEATURE(); @@ -214,6 +217,7 @@ EXPORT_API int hand_gesture_is_supported_type(hand_gesture_h handle, hand_gestur //LCOV_EXCL_START EXPORT_API int hand_gesture_set_handtype(hand_gesture_h handle, hand_gesture_handtype_e hand_type) { + LOGW("DEPRECATION WARNING: hand_gesture_set_handtype() is deprecated and will be removed from next release."); LOGD("hand_gesture_set_handtype"); CHECK_GESTURE_FEATURE(); @@ -232,6 +236,7 @@ EXPORT_API int hand_gesture_set_handtype(hand_gesture_h handle, hand_gesture_han EXPORT_API int hand_gesture_set_workmode(hand_gesture_h handle, hand_gesture_workmode_e work_mode) { + LOGW("DEPRECATION WARNING: hand_gesture_set_workmode() is deprecated and will be removed from next release."); LOGD("hand_gesture_set_workmode"); CHECK_GESTURE_FEATURE(); @@ -250,6 +255,7 @@ EXPORT_API int hand_gesture_set_workmode(hand_gesture_h handle, hand_gesture_wor //LCOV_EXCL_STOP EXPORT_API int hand_gesture_set_option(hand_gesture_h handle, hand_gesture_option_e option) { + LOGW("DEPRECATION WARNING: hand_gesture_set_option() is deprecated and will be removed from next release."); LOGD("hand_gesture_set_option"); CHECK_GESTURE_FEATURE(); @@ -268,6 +274,7 @@ EXPORT_API int hand_gesture_set_option(hand_gesture_h handle, hand_gesture_optio //LCOV_EXCL_START EXPORT_API int hand_gesture_set_sensitivity(hand_gesture_h handle, int sensitivity) { + LOGW("DEPRECATION WARNING: hand_gesture_set_sensitivity() is deprecated and will be removed from next release."); LOGD("hand_gesture_set_sensitivity"); CHECK_GESTURE_FEATURE(); @@ -286,6 +293,7 @@ EXPORT_API int hand_gesture_set_sensitivity(hand_gesture_h handle, int sensitivi //LCOV_EXCL_STOP EXPORT_API int hand_gesture_start_recognition(hand_gesture_h handle, hand_gesture_type_e gesture_type, hand_gesture_recognition_cb callback, void *user_data) { + LOGW("DEPRECATION WARNING: hand_gesture_start_recognition() is deprecated and will be removed from next release."); LOGD("hand_gesture_start_recognition"); CHECK_GESTURE_FEATURE(); @@ -320,6 +328,7 @@ EXPORT_API int hand_gesture_start_recognition(hand_gesture_h handle, hand_gestur EXPORT_API int hand_gesture_stop_recognition(hand_gesture_h handle) { + LOGW("DEPRECATION WARNING: hand_gesture_stop_recognition() is deprecated and will be removed from next release."); CHECK_GESTURE_FEATURE(); ASSERT_NOT_NULL(handle); @@ -340,6 +349,7 @@ EXPORT_API int hand_gesture_stop_recognition(hand_gesture_h handle) //LCOV_EXCL_START EXPORT_API int hand_gesture_get_event(const hand_gesture_data_h data, hand_gesture_event_e *event) { + LOGW("DEPRECATION WARNING: hand_gesture_get_event() is deprecated and will be removed from next release."); CHECK_GESTURE_FEATURE(); ASSERT_NOT_NULL(data); ASSERT_NOT_NULL(event); @@ -351,6 +361,7 @@ EXPORT_API int hand_gesture_get_event(const hand_gesture_data_h data, hand_gestu //LCOV_EXCL_STOP EXPORT_API int hand_gesture_get_engine_info(hand_gesture_h handle, char** engine_app_id, char** engine_name) { + LOGW("DEPRECATION WARNING: hand_gesture_get_engine_info() is deprecated and will be removed from next release."); LOGD("[engineInfo] hand_gesture_get_engine_info"); CHECK_GESTURE_FEATURE(); @@ -369,6 +380,7 @@ EXPORT_API int hand_gesture_get_engine_info(hand_gesture_h handle, char** engine EXPORT_API int hand_gesture_set_error_cb(hand_gesture_h handle, hand_gesture_error_cb callback, void *user_data) { + LOGW("DEPRECATION WARNING: hand_gesture_set_error_cb() is deprecated and will be removed from next release."); CHECK_GESTURE_FEATURE(); ASSERT_NOT_NULL(handle); @@ -387,6 +399,7 @@ EXPORT_API int hand_gesture_set_error_cb(hand_gesture_h handle, hand_gesture_err EXPORT_API int hand_gesture_unset_error_cb(hand_gesture_h handle) { + LOGW("DEPRECATION WARNING: hand_gesture_unset_error_cb() is deprecated and will be removed from next release."); CHECK_GESTURE_FEATURE(); ASSERT_NOT_NULL(handle); diff --git a/include/gesture.h b/include/gesture.h index 6065720..cfa0720 100644 --- a/include/gesture.h +++ b/include/gesture.h @@ -34,12 +34,14 @@ extern "C" { */ /** + * @deprecated Deprecated since 8.0. * @brief The hand gesture handle. * @since_tizen @if WEARABLE 6.0 @endif */ typedef struct hand_gesture_s *hand_gesture_h; /** + * @deprecated Deprecated since 8.0. * @brief Called when a gesture is detected. * @details Following error codes can be delivered: \n * #HAND_GESTURE_ERROR_NONE, \n @@ -65,6 +67,7 @@ typedef struct hand_gesture_s *hand_gesture_h; typedef void(* hand_gesture_recognition_cb)(hand_gesture_h handle, hand_gesture_type_e gesture, double timestamp, hand_gesture_error_e error, void *user_data) TIZEN_DEPRECATED_API; /** + * @deprecated Deprecated since 8.0. * @brief Called when an error is occurred. * @details Following error codes can be delivered: \n * #HAND_GESTURE_ERROR_INVALID_PARAMETER, \n @@ -92,6 +95,7 @@ typedef void(* hand_gesture_recognition_cb)(hand_gesture_h handle, hand_gesture_ typedef void(* hand_gesture_error_cb)(hand_gesture_h handle, hand_gesture_error_e error, const char* msg, void *user_data) TIZEN_DEPRECATED_API; /** + * @deprecated Deprecated since 8.0. * @brief Checks whether a gesture is supported or not. * @details Check if the given gesture type is supported on the device. * @@ -111,6 +115,7 @@ typedef void(* hand_gesture_error_cb)(hand_gesture_h handle, hand_gesture_error_ int hand_gesture_is_supported_type(hand_gesture_h handle, hand_gesture_type_e gesture, bool* supported) TIZEN_DEPRECATED_API; /** + * @deprecated Deprecated since 8.0. * @brief Creates a gesture handle. * * @since_tizen @if WEARABLE 6.0 @endif @@ -133,6 +138,7 @@ int hand_gesture_is_supported_type(hand_gesture_h handle, hand_gesture_type_e ge int hand_gesture_create(hand_gesture_h *handle) TIZEN_DEPRECATED_API; /** + * @deprecated Deprecated since 8.0. * @brief Destroys a gesture handle. * * @since_tizen @if WEARABLE 6.0 @endif @@ -150,6 +156,7 @@ int hand_gesture_create(hand_gesture_h *handle) TIZEN_DEPRECATED_API; int hand_gesture_destroy(hand_gesture_h handle) TIZEN_DEPRECATED_API; /** + * @deprecated Deprecated since 8.0. * @brief Sets an option for gesture recognition. * * @since_tizen @if WEARABLE 6.0 @endif @@ -170,6 +177,7 @@ int hand_gesture_destroy(hand_gesture_h handle) TIZEN_DEPRECATED_API; int hand_gesture_set_option(hand_gesture_h handle, hand_gesture_option_e option) TIZEN_DEPRECATED_API; /** + * @deprecated Deprecated since 8.0. * @brief Starts to recognize a gesture. * @details Sets a callback function to be invoked when the gesture is detected, and starts to monitor occurrences of the gesture. * @@ -199,6 +207,7 @@ int hand_gesture_set_option(hand_gesture_h handle, hand_gesture_option_e option) int hand_gesture_start_recognition(hand_gesture_h handle, hand_gesture_type_e gesture, hand_gesture_recognition_cb callback, void *user_data) TIZEN_DEPRECATED_API; /** + * @deprecated Deprecated since 8.0. * @brief Stops recognizing the gesture registered to the gesture handle. * * @since_tizen @if WEARABLE 6.0 @endif @@ -215,6 +224,7 @@ int hand_gesture_start_recognition(hand_gesture_h handle, hand_gesture_type_e ge int hand_gesture_stop_recognition(hand_gesture_h handle) TIZEN_DEPRECATED_API; /** + * @deprecated Deprecated since 8.0. * @brief Gets a gesture engine information. * * @since_tizen @if WEARABLE 6.0 @endif @@ -233,6 +243,7 @@ int hand_gesture_stop_recognition(hand_gesture_h handle) TIZEN_DEPRECATED_API; int hand_gesture_get_engine_info(hand_gesture_h handle, char** engine_app_id, char** engine_name) TIZEN_DEPRECATED_API; /** + * @deprecated Deprecated since 8.0. * @brief Sets a callback function to be invoked when an error is occurred. * * @since_tizen @if WEARABLE 6.0 @endif @@ -253,6 +264,7 @@ int hand_gesture_get_engine_info(hand_gesture_h handle, char** engine_app_id, ch int hand_gesture_set_error_cb(hand_gesture_h handle, hand_gesture_error_cb callback, void *user_data) TIZEN_DEPRECATED_API; /** + * @deprecated Deprecated since 8.0. * @brief Unsets a callback function to be invoked when an error is occurred. * * @since_tizen @if WEARABLE 6.0 @endif diff --git a/include/gesture_common.h b/include/gesture_common.h index a909343..3ef2b06 100644 --- a/include/gesture_common.h +++ b/include/gesture_common.h @@ -38,12 +38,14 @@ extern "C" { */ /** + * @deprecated Deprecated since 8.0. * @brief Delivery through hand_gesture_recognition_cb() of gesture data handle. * @since_tizen @if WEARABLE 6.0 @endif */ typedef struct hand_gesture_data_s* hand_gesture_data_h; /** + * @deprecated Deprecated since 8.0. * @brief Enumerations for hand gesture function error. * * @since_tizen @if WEARABLE 6.0 @endif @@ -61,6 +63,7 @@ typedef enum { } hand_gesture_error_e; /** + * @deprecated Deprecated since 8.0. * @brief Enumerations for hand gesture types. * @since_tizen @if WEARABLE 6.0 @endif */ @@ -70,6 +73,7 @@ typedef enum { } hand_gesture_type_e; /** + * @deprecated Deprecated since 8.0. * @brief Enumerations for gesture recognition option. * @details If the default option is used, the system tries to reduce power consumption. * For example, the recognition engine may stop detecting gestures if the display is turned off.