From 79cd6212c3fda06be83735212a8a6ce6fa76464c Mon Sep 17 00:00:00 2001 From: chakradhar Date: Tue, 11 Aug 2020 16:32:51 +0530 Subject: [PATCH] Deprecate capi-context-motion Change-Id: I07c85f9f88740b1e47ec2bac01fc0e33382d31c0 --- doc/activity_recognition_doc.h | 2 +- doc/gesture_recognition_doc.h | 2 +- include/activity_recognition.h | 24 ++++++++++++++++++------ include/gesture_recognition.h | 28 +++++++++++++++++++++------- packaging/capi-context-motion.spec | 2 +- src/Activity.cpp | 6 ++++++ src/Gesture.cpp | 7 +++++++ 7 files changed, 55 insertions(+), 16 deletions(-) diff --git a/doc/activity_recognition_doc.h b/doc/activity_recognition_doc.h index 57e7428..92d6f82 100644 --- a/doc/activity_recognition_doc.h +++ b/doc/activity_recognition_doc.h @@ -19,7 +19,7 @@ /** * @ingroup CAPI_CONTEXT_FRAMEWORK - * @defgroup CAPI_CONTEXT_ACTIVITY_MODULE Activity Recognition + * @defgroup CAPI_CONTEXT_ACTIVITY_MODULE Activity Recognition (Deprecated) * * @brief The activity recognition API allows applications to be notified and * react when a user activity is recognized. diff --git a/doc/gesture_recognition_doc.h b/doc/gesture_recognition_doc.h index dfc8fa6..189047e 100644 --- a/doc/gesture_recognition_doc.h +++ b/doc/gesture_recognition_doc.h @@ -19,7 +19,7 @@ /** * @ingroup CAPI_CONTEXT_FRAMEWORK - * @defgroup CAPI_CONTEXT_GESTURE_MODULE Gesture Recognition + * @defgroup CAPI_CONTEXT_GESTURE_MODULE Gesture Recognition (Deprecated) * * @brief The gesture recognition API allows applications to be notified and * react when the user performs a gesture. diff --git a/include/activity_recognition.h b/include/activity_recognition.h index 8d3f5cd..76ad934 100644 --- a/include/activity_recognition.h +++ b/include/activity_recognition.h @@ -32,18 +32,21 @@ extern "C" { #endif // __cplusplus /** + * @deprecated Deprecated since 6.0. * @brief The activity recognizer controlling handle. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ typedef struct _activity_handle_s* activity_h; /** + * @deprecated Deprecated since 6.0. * @brief Delivery through activity_recognition_cb() of activity data handle. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ typedef struct _activity_data_s* activity_data_h; /** + * @deprecated Deprecated since 6.0. * @brief Enumeration for error codes. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ @@ -60,6 +63,7 @@ typedef enum { } activity_error_e; /** + * @deprecated Deprecated since 6.0. * @brief Enumeration for activity types. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ @@ -71,6 +75,7 @@ typedef enum { } activity_type_e; /** + * @deprecated Deprecated since 6.0. * @brief Enumeration for recognition accuracy. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ @@ -81,6 +86,7 @@ typedef enum { } activity_accuracy_e; /** + * @deprecated Deprecated since 6.0. * @brief Called when a activity is recognized. * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif @@ -101,6 +107,7 @@ typedef enum { typedef void(* activity_recognition_cb)(activity_type_e activity, const activity_data_h data, double timestamp, activity_error_e error, void *user_data); /** + * @deprecated Deprecated since 6.0. * @brief Check whether the activity is supported or not. * @details Check if the given activity type is supported in the current device. * @@ -117,9 +124,10 @@ typedef void(* activity_recognition_cb)(activity_type_e activity, const activity * @retval #ACTIVITY_ERROR_OPERATION_FAILED Operation failed because of a system error * @retval #ACTIVITY_ERROR_PERMISSION_DENIED Does not have permission to use this */ -int activity_is_supported(activity_type_e activity, bool* supported); +int activity_is_supported(activity_type_e activity, bool* supported) TIZEN_DEPRECATED_API; /** + * @deprecated Deprecated since 6.0. * @brief Initializes an activity handle. * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif @@ -134,9 +142,10 @@ int activity_is_supported(activity_type_e activity, bool* supported); * * @see activity_release() */ -int activity_create(activity_h *handle); +int activity_create(activity_h *handle) TIZEN_DEPRECATED_API; /** + * @deprecated Deprecated since 6.0. * @brief Releases the resources occupied by the activity handle. * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif @@ -151,9 +160,10 @@ int activity_create(activity_h *handle); * * @pre activity_create() */ -int activity_release(activity_h handle); +int activity_release(activity_h handle) TIZEN_DEPRECATED_API; /** + * @deprecated Deprecated since 6.0. * @brief Starts to recognize an activity. * @details Sets a callback function to be invoked when the activity is detected, * and starts to monitor occurrences of the activity. @@ -177,9 +187,10 @@ int activity_release(activity_h handle); * @post activity_recognition_cb() * @see activity_stop_recognition() */ -int activity_start_recognition(activity_h handle, activity_type_e activity, activity_recognition_cb callback, void *user_data); +int activity_start_recognition(activity_h handle, activity_type_e activity, activity_recognition_cb callback, void *user_data) TIZEN_DEPRECATED_API; /** + * @deprecated Deprecated since 6.0. * @brief Stops recognizing the activity registered to the activity handle. * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif @@ -193,9 +204,10 @@ int activity_start_recognition(activity_h handle, activity_type_e activity, acti * @retval #ACTIVITY_ERROR_NOT_STARTED Nothing is started using the @c handle * @retval #ACTIVITY_ERROR_OPERATION_FAILED Operation failed because of a system error */ -int activity_stop_recognition(activity_h handle); +int activity_stop_recognition(activity_h handle) TIZEN_DEPRECATED_API; /** + * @deprecated Deprecated since 6.0. * @brief Gets the recognition accuracy. * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif @@ -209,7 +221,7 @@ int activity_stop_recognition(activity_h handle); * @retval #ACTIVITY_ERROR_NOT_SUPPORTED Activity recognition is not supported * @retval #ACTIVITY_ERROR_OPERATION_FAILED Operation failed because of a system error */ -int activity_get_accuracy(const activity_data_h data, activity_accuracy_e *accuracy); +int activity_get_accuracy(const activity_data_h data, activity_accuracy_e *accuracy) TIZEN_DEPRECATED_API; #ifdef __cplusplus } diff --git a/include/gesture_recognition.h b/include/gesture_recognition.h index 024adfe..0cd7a02 100644 --- a/include/gesture_recognition.h +++ b/include/gesture_recognition.h @@ -32,18 +32,21 @@ extern "C" { #endif // __cplusplus /** + * @deprecated Deprecated since 6.0. * @brief The gesture recognizer controlling handle. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ typedef struct _gesture_handle_s* gesture_h; /** + * @deprecated Deprecated since 6.0. * @brief Delivery through gesture_recognition_cb() of gesture data handle. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ typedef struct _gesture_data_s* gesture_data_h; /** + * @deprecated Deprecated since 6.0. * @brief Enumeration for error codes. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ @@ -60,6 +63,7 @@ typedef enum { } gesture_error_e; /** + * @deprecated Deprecated since 6.0. * @brief Enumeration for gesture types. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ @@ -76,6 +80,7 @@ typedef enum { } gesture_type_e; /** + * @deprecated Deprecated since 6.0. * @brief Enumeration 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. @@ -89,6 +94,7 @@ typedef enum { } gesture_option_e; /** + * @deprecated Deprecated since 6.0. * @brief Enumeration for gesture event types. * @details With regards to type of the gesture, gesture_get_event() returns one of the followings. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif @@ -109,6 +115,7 @@ typedef enum { } gesture_event_e; /** + * @deprecated Deprecated since 6.0. * @brief Called when a gesture is detected. * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif @@ -130,6 +137,7 @@ typedef enum { typedef void(* gesture_recognition_cb)(gesture_type_e gesture, const gesture_data_h data, double timestamp, gesture_error_e error, void *user_data); /** + * @deprecated Deprecated since 6.0. * @brief Check whether the gesture is supported or not. * @details Check if the given gesture type is supported in the current device. * @@ -146,9 +154,10 @@ typedef void(* gesture_recognition_cb)(gesture_type_e gesture, const gesture_dat * @retval #GESTURE_ERROR_OPERATION_FAILED Operation failed because of a system error * @retval #GESTURE_ERROR_PERMISSION_DENIED Does not have permission to use this */ -int gesture_is_supported(gesture_type_e gesture, bool* supported); +int gesture_is_supported(gesture_type_e gesture, bool* supported) TIZEN_DEPRECATED_API; /** + * @deprecated Deprecated since 6.0. * @brief Initializes a gesture handle. * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif @@ -163,9 +172,10 @@ int gesture_is_supported(gesture_type_e gesture, bool* supported); * * @see gesture_release() */ -int gesture_create(gesture_h *handle); +int gesture_create(gesture_h *handle) TIZEN_DEPRECATED_API; /** + * @deprecated Deprecated since 6.0. * @brief Releases the resources occupied by the gesture handle. * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif @@ -180,9 +190,10 @@ int gesture_create(gesture_h *handle); * * @pre gesture_create() */ -int gesture_release(gesture_h handle); +int gesture_release(gesture_h handle) TIZEN_DEPRECATED_API; /** + * @deprecated Deprecated since 6.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. @@ -207,9 +218,10 @@ int gesture_release(gesture_h handle); * @post gesture_recognition_cb() * @see gesture_stop_recognition() */ -int gesture_start_recognition(gesture_h handle, gesture_type_e gesture, gesture_option_e option, gesture_recognition_cb callback, void *user_data); +int gesture_start_recognition(gesture_h handle, gesture_type_e gesture, gesture_option_e option, gesture_recognition_cb callback, void *user_data) TIZEN_DEPRECATED_API; /** + * @deprecated Deprecated since 6.0. * @brief Stops recognizing the gesture registered to the gesture handle. * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif @@ -223,9 +235,10 @@ int gesture_start_recognition(gesture_h handle, gesture_type_e gesture, gesture_ * @retval #GESTURE_ERROR_NOT_STARTED Nothing is started using the @c handle * @retval #GESTURE_ERROR_OPERATION_FAILED Operation failed because of a system error */ -int gesture_stop_recognition(gesture_h handle); +int gesture_stop_recognition(gesture_h handle) TIZEN_DEPRECATED_API; /** + * @deprecated Deprecated since 6.0. * @brief Gets the gesture event from the gesture data received. * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif @@ -239,9 +252,10 @@ int gesture_stop_recognition(gesture_h handle); * @retval #GESTURE_ERROR_NOT_SUPPORTED Gesture recognition is not supported * @retval #GESTURE_ERROR_OPERATION_FAILED Operation failed because of a system error */ -int gesture_get_event(const gesture_data_h data, gesture_event_e *event); +int gesture_get_event(const gesture_data_h data, gesture_event_e *event) TIZEN_DEPRECATED_API; /** + * @deprecated Deprecated since 6.0. * @brief Gets the tilting degrees from #GESTURE_TILT data received. * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif @@ -256,7 +270,7 @@ int gesture_get_event(const gesture_data_h data, gesture_event_e *event); * @retval #GESTURE_ERROR_NOT_SUPPORTED Gesture recognition is not supported * @retval #GESTURE_ERROR_OPERATION_FAILED Operation failed because of a system error */ -int gesture_get_tilt(const gesture_data_h data, int *x, int *y); +int gesture_get_tilt(const gesture_data_h data, int *x, int *y) TIZEN_DEPRECATED_API; #ifdef __cplusplus } diff --git a/packaging/capi-context-motion.spec b/packaging/capi-context-motion.spec index 0da3872..8407b84 100644 --- a/packaging/capi-context-motion.spec +++ b/packaging/capi-context-motion.spec @@ -1,6 +1,6 @@ Name: capi-context-motion Summary: Tizen Native Motion Recognition API -Version: 2.0.2 +Version: 2.0.3 Release: 1 Group: Service/Context License: Apache-2.0 diff --git a/src/Activity.cpp b/src/Activity.cpp index 7a47297..4ec3735 100644 --- a/src/Activity.cpp +++ b/src/Activity.cpp @@ -32,6 +32,7 @@ struct _activity_handle_s { EXPORT_API int activity_is_supported(activity_type_e activity, bool* supported) { + _W("DEPRECATION WARNING: %s() is deprecated and will be removed from next release.", __func__); if (supported) *supported = false; @@ -47,6 +48,7 @@ EXPORT_API int activity_is_supported(activity_type_e activity, bool* supported) EXPORT_API int activity_create(activity_h *handle) { + _W("DEPRECATION WARNING: %s() is deprecated and will be removed from next release.", __func__); ASSERT_SUPPORTED(FEATURE_ACTIVITY); //LCOV_EXCL_START ASSERT_NOT_NULL(handle); @@ -68,6 +70,7 @@ EXPORT_API int activity_create(activity_h *handle) EXPORT_API int activity_release(activity_h handle) { + _W("DEPRECATION WARNING: %s() is deprecated and will be removed from next release.", __func__); ASSERT_SUPPORTED(FEATURE_ACTIVITY); //LCOV_EXCL_START ASSERT_NOT_NULL(handle); @@ -81,6 +84,7 @@ EXPORT_API int activity_release(activity_h handle) EXPORT_API int activity_start_recognition(activity_h handle, activity_type_e activity, activity_recognition_cb callback, void *user_data) { + _W("DEPRECATION WARNING: %s() is deprecated and will be removed from next release.", __func__); ASSERT_SUPPORTED(FEATURE_ACTIVITY); //LCOV_EXCL_START ASSERT_NOT_NULL(handle); @@ -104,6 +108,7 @@ EXPORT_API int activity_start_recognition(activity_h handle, activity_type_e act EXPORT_API int activity_stop_recognition(activity_h handle) { + _W("DEPRECATION WARNING: %s() is deprecated and will be removed from next release.", __func__); ASSERT_SUPPORTED(FEATURE_ACTIVITY); //LCOV_EXCL_START ASSERT_NOT_NULL(handle); @@ -116,6 +121,7 @@ EXPORT_API int activity_stop_recognition(activity_h handle) EXPORT_API int activity_get_accuracy(const activity_data_h data, activity_accuracy_e *accuracy) { + _W("DEPRECATION WARNING: %s() is deprecated and will be removed from next release.", __func__); ASSERT_SUPPORTED(FEATURE_ACTIVITY); //LCOV_EXCL_START ASSERT_NOT_NULL(data); diff --git a/src/Gesture.cpp b/src/Gesture.cpp index 18e6386..0951f26 100644 --- a/src/Gesture.cpp +++ b/src/Gesture.cpp @@ -32,6 +32,7 @@ struct _gesture_handle_s { EXPORT_API int gesture_is_supported(gesture_type_e gesture, bool* supported) { + _W("DEPRECATION WARNING: %s() is deprecated and will be removed from next release.", __func__); if (supported) *supported = false; @@ -47,6 +48,7 @@ EXPORT_API int gesture_is_supported(gesture_type_e gesture, bool* supported) EXPORT_API int gesture_create(gesture_h *handle) { + _W("DEPRECATION WARNING: %s() is deprecated and will be removed from next release.", __func__); ASSERT_SUPPORTED(FEATURE_GESTURE); //LCOV_EXCL_START ASSERT_NOT_NULL(handle); @@ -68,6 +70,7 @@ EXPORT_API int gesture_create(gesture_h *handle) EXPORT_API int gesture_release(gesture_h handle) { + _W("DEPRECATION WARNING: %s() is deprecated and will be removed from next release.", __func__); ASSERT_SUPPORTED(FEATURE_GESTURE); //LCOV_EXCL_START ASSERT_NOT_NULL(handle); @@ -81,6 +84,7 @@ EXPORT_API int gesture_release(gesture_h handle) EXPORT_API int gesture_start_recognition(gesture_h handle, gesture_type_e gesture, gesture_option_e option, gesture_recognition_cb callback, void *user_data) { + _W("DEPRECATION WARNING: %s() is deprecated and will be removed from next release.", __func__); ASSERT_SUPPORTED(FEATURE_GESTURE); //LCOV_EXCL_START ASSERT_NOT_NULL(handle); @@ -112,6 +116,7 @@ EXPORT_API int gesture_start_recognition(gesture_h handle, gesture_type_e gestur EXPORT_API int gesture_stop_recognition(gesture_h handle) { + _W("DEPRECATION WARNING: %s() is deprecated and will be removed from next release.", __func__); ASSERT_SUPPORTED(FEATURE_GESTURE); //LCOV_EXCL_START ASSERT_NOT_NULL(handle); @@ -124,6 +129,7 @@ EXPORT_API int gesture_stop_recognition(gesture_h handle) EXPORT_API int gesture_get_event(const gesture_data_h data, gesture_event_e *event) { + _W("DEPRECATION WARNING: %s() is deprecated and will be removed from next release.", __func__); ASSERT_SUPPORTED(FEATURE_GESTURE); //LCOV_EXCL_START ASSERT_NOT_NULL(data); @@ -140,6 +146,7 @@ EXPORT_API int gesture_get_event(const gesture_data_h data, gesture_event_e *eve EXPORT_API int gesture_get_tilt(const gesture_data_h data, int *x, int *y) { + _W("DEPRECATION WARNING: %s() is deprecated and will be removed from next release.", __func__); ASSERT_SUPPORTED(FEATURE_GESTURE); //LCOV_EXCL_START ASSERT_NOT_NULL(data); -- 2.7.4