From 6e065f49883e2facb3c021e02f338e058ccf15c8 Mon Sep 17 00:00:00 2001 From: Mu-Woong Lee Date: Tue, 7 Mar 2017 15:48:03 +0900 Subject: [PATCH 01/16] Add a dummy package motion-devel to avoid obs unresolvable issues Change-Id: I90dcc411642fccbd02197a52256efefd9e492843 Signed-off-by: Mu-Woong Lee --- packaging/capi-context-motion.spec | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/packaging/capi-context-motion.spec b/packaging/capi-context-motion.spec index 36b1c99..bd4732b 100644 --- a/packaging/capi-context-motion.spec +++ b/packaging/capi-context-motion.spec @@ -66,3 +66,13 @@ Tizen Native Motion Recognition API (Development) %files devel %{_includedir}/*/*.h %{_libdir}/pkgconfig/*.pc + + +%package -n motion-devel +Summary: Dummy package for OBS build +Group: Framework/context + +%description -n motion-devel +Dummy package for OBS build + +%files -n motion-devel -- 2.7.4 From 95dd318aa73939c40eb73b6dbfee3932ba887b2f Mon Sep 17 00:00:00 2001 From: Mu-Woong Lee Date: Tue, 7 Mar 2017 15:48:03 +0900 Subject: [PATCH 02/16] Add a dummy package motion-devel to avoid obs unresolvable issues Change-Id: I90dcc411642fccbd02197a52256efefd9e492843 Signed-off-by: Mu-Woong Lee (cherry picked from commit 6e065f49883e2facb3c021e02f338e058ccf15c8) --- packaging/capi-context-motion.spec | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/packaging/capi-context-motion.spec b/packaging/capi-context-motion.spec index 36b1c99..bd4732b 100644 --- a/packaging/capi-context-motion.spec +++ b/packaging/capi-context-motion.spec @@ -66,3 +66,13 @@ Tizen Native Motion Recognition API (Development) %files devel %{_includedir}/*/*.h %{_libdir}/pkgconfig/*.pc + + +%package -n motion-devel +Summary: Dummy package for OBS build +Group: Framework/context + +%description -n motion-devel +Dummy package for OBS build + +%files -n motion-devel -- 2.7.4 From a28acec79812bd39bba63122160bda059df91fb6 Mon Sep 17 00:00:00 2001 From: Mu-Woong Lee Date: Tue, 7 Mar 2017 16:20:06 +0900 Subject: [PATCH 03/16] Add a dummy package motion to avoid obs image creation failure Change-Id: I445df219e455277d4be03e62dcb8caf7b9b6cd0f Signed-off-by: Mu-Woong Lee --- packaging/capi-context-motion.spec | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packaging/capi-context-motion.spec b/packaging/capi-context-motion.spec index bd4732b..d4f3978 100644 --- a/packaging/capi-context-motion.spec +++ b/packaging/capi-context-motion.spec @@ -68,6 +68,15 @@ Tizen Native Motion Recognition API (Development) %{_libdir}/pkgconfig/*.pc +%package -n motion +Summary: Dummy package for OBS build +Group: Framework/context + +%description -n motion +Dummy package for OBS image creation + +%files -n motion + %package -n motion-devel Summary: Dummy package for OBS build Group: Framework/context -- 2.7.4 From 356856871c139cbfb70d1149c0cfef120ad41746 Mon Sep 17 00:00:00 2001 From: Mu-Woong Lee Date: Tue, 7 Mar 2017 16:34:51 +0900 Subject: [PATCH 04/16] Disable the conflicting virtual package Change-Id: I7947a82d90717db8be7119a39038a0745ef165ea Signed-off-by: Mu-Woong Lee --- packaging/capi-context-motion.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packaging/capi-context-motion.spec b/packaging/capi-context-motion.spec index d4f3978..09a4cf1 100644 --- a/packaging/capi-context-motion.spec +++ b/packaging/capi-context-motion.spec @@ -17,7 +17,7 @@ Requires(post): /sbin/ldconfig Requires(postun): /sbin/ldconfig # Backward compatibility -Provides: motion +#Provides: motion %description Tizen Native Motion Recognition API @@ -71,6 +71,7 @@ Tizen Native Motion Recognition API (Development) %package -n motion Summary: Dummy package for OBS build Group: Framework/context +Requires: %{name} %description -n motion Dummy package for OBS image creation -- 2.7.4 From 2fe57026bd178891d0ca86b563eb9f20cdf8281d Mon Sep 17 00:00:00 2001 From: Mu-Woong Lee Date: Sat, 18 Mar 2017 06:10:29 -0700 Subject: [PATCH 05/16] Remove dummy packages motion & motion-devel Those dummy packages were introduced to avoid failures of obs pre-build, but not necessary anymore. Change-Id: I51d286f3c67433d9b28ca4861910ed73acb0694c Signed-off-by: Mu-Woong Lee --- packaging/capi-context-motion.spec | 24 ++---------------------- 1 file changed, 2 insertions(+), 22 deletions(-) diff --git a/packaging/capi-context-motion.spec b/packaging/capi-context-motion.spec index 09a4cf1..1c3da8b 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.0 +Version: 2.0.1 Release: 1 Group: Service/Context License: Apache-2.0 @@ -17,7 +17,7 @@ Requires(post): /sbin/ldconfig Requires(postun): /sbin/ldconfig # Backward compatibility -#Provides: motion +Provides: motion %description Tizen Native Motion Recognition API @@ -66,23 +66,3 @@ Tizen Native Motion Recognition API (Development) %files devel %{_includedir}/*/*.h %{_libdir}/pkgconfig/*.pc - - -%package -n motion -Summary: Dummy package for OBS build -Group: Framework/context -Requires: %{name} - -%description -n motion -Dummy package for OBS image creation - -%files -n motion - -%package -n motion-devel -Summary: Dummy package for OBS build -Group: Framework/context - -%description -n motion-devel -Dummy package for OBS build - -%files -n motion-devel -- 2.7.4 From b59ecb23e7febca65ffaa25d00923638e240833b Mon Sep 17 00:00:00 2001 From: Mu-Woong Lee Date: Wed, 5 Apr 2017 16:43:15 +0900 Subject: [PATCH 06/16] Fix the build script typos and nonconventional so symlink packaging Change-Id: Ic9d6bcf3ea55a8d1bbf38a1252f7ee42bbdd4687 Signed-off-by: Mu-Woong Lee --- CMakeLists.txt | 7 +++---- packaging/capi-context-motion.spec | 3 ++- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d8f80d9..16f3895 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,7 +17,7 @@ INCLUDE_DIRECTORIES( ) ADD_DEFINITIONS(-O2 -Wall -fPIC -flto -fdata-sections -ffunction-sections -fvisibility=hidden) -SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fPIC -Wl,--as-needed -Wl,--gc-section -Wl,--print-gc-section") +SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fPIC -Wl,--as-needed -Wl,--gc-sections -Wl,--print-gc-sections") # Build pkg_check_modules(pkgs REQUIRED ${dependency}) @@ -43,12 +43,11 @@ INSTALL( SET(VERSION ${FULLVER}) SET(PC_PREFIX ${CMAKE_INSTALL_PREFIX}) SET(PC_NAME ${PROJECT_NAME}) -SET(PC_LIBDIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}") +SET(PC_LIBDIR "${CMAKE_INSTALL_LIBDIR}") SET(PC_INCLUDE "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}/${inc_subdir}") -SET(PC_DESCRIPTION "Tizen Native Motion Recognition API") +SET(PC_DESCRIPTION "Tizen C Native Motion Recognition API") SET(PC_REQUIRED ${dependency}) SET(PC_LDFLAGS -l${target}) -SET(PC_CFLAGS -I\${includedir}/${inc_subdir}) CONFIGURE_FILE( ${PROJECT_NAME}.pc.in diff --git a/packaging/capi-context-motion.spec b/packaging/capi-context-motion.spec index 1c3da8b..3f925dd 100644 --- a/packaging/capi-context-motion.spec +++ b/packaging/capi-context-motion.spec @@ -52,7 +52,7 @@ ln -s lib%{name}.so.%{version} %{buildroot}/%{_libdir}/libcore-context-manager.s %files %manifest packaging/%{name}.manifest -%{_libdir}/*.so* +%{_libdir}/*.so.* %license LICENSE %package devel @@ -65,4 +65,5 @@ Tizen Native Motion Recognition API (Development) %files devel %{_includedir}/*/*.h +%{_libdir}/*.so %{_libdir}/pkgconfig/*.pc -- 2.7.4 From 5d34aca810d6997032b352d298d5c30f1bccb2a2 Mon Sep 17 00:00:00 2001 From: Mu-Woong Lee Date: Mon, 3 Apr 2017 19:23:33 +0900 Subject: [PATCH 07/16] Doxygen: fix the broken feature page links Change-Id: I9ab1e678dff5355c06b20582368a58f8be747770 Signed-off-by: Mu-Woong Lee (cherry picked from commit 69f9a8370b008a5b37b72f7d42be50748b5d5807) --- doc/activity_recognition_doc.h | 2 +- doc/gesture_recognition_doc.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/activity_recognition_doc.h b/doc/activity_recognition_doc.h index f7c822f..9999971 100644 --- a/doc/activity_recognition_doc.h +++ b/doc/activity_recognition_doc.h @@ -121,6 +121,6 @@ * * To ensure your application is only running on the device with specific features, please define the features in your manifest file using the manifest editor in the SDK.\n * - * More details on featuring your application can be found from Feature Element. + * More details on featuring your application can be found from Feature Element. * */ diff --git a/doc/gesture_recognition_doc.h b/doc/gesture_recognition_doc.h index 4432482..f6adc27 100644 --- a/doc/gesture_recognition_doc.h +++ b/doc/gesture_recognition_doc.h @@ -144,6 +144,6 @@ * * To ensure your application is only running on the device with specific features, please define the features in your manifest file using the manifest editor in the SDK.\n * - * More details on featuring your application can be found from Feature Element. + * More details on featuring your application can be found from Feature Element. * */ -- 2.7.4 From 2306d55637cab794e38a50a48f2cc93e8230e95b Mon Sep 17 00:00:00 2001 From: Mu-Woong Lee Date: Wed, 5 Apr 2017 17:03:19 +0900 Subject: [PATCH 08/16] Change the log tag to CAPI-MOTION Change-Id: I68a1473ab9472879dfd21f09c7c58bc366d671d0 Signed-off-by: Mu-Woong Lee --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 16f3895..560fe64 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,7 +29,7 @@ ENDFOREACH(flag) ADD_LIBRARY(${target} SHARED ${SRCS}) TARGET_LINK_LIBRARIES(${target} ${pkgs_LDFLAGS}) SET_TARGET_PROPERTIES(${target} PROPERTIES COMPILE_FLAGS ${EXTRA_CFLAGS}) -SET_TARGET_PROPERTIES(${target} PROPERTIES COMPILE_DEFINITIONS "LOG_TAG=\"MOTION\"") +SET_TARGET_PROPERTIES(${target} PROPERTIES COMPILE_DEFINITIONS "LOG_TAG=\"CAPI-MOTION\"") SET_TARGET_PROPERTIES(${target} PROPERTIES SOVERSION ${MAJORVER}) SET_TARGET_PROPERTIES(${target} PROPERTIES VERSION ${FULLVER}) -- 2.7.4 From 7504919fbb32d1c05acb4c5718b3e6b164b52871 Mon Sep 17 00:00:00 2001 From: Mu-Woong Lee Date: Tue, 11 Apr 2017 14:44:49 +0900 Subject: [PATCH 09/16] Version 2.0.2 Change-Id: I62c187cc723cf7f7779391bda314e63cea7c9b7b Signed-off-by: Mu-Woong Lee --- packaging/capi-context-motion.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/capi-context-motion.spec b/packaging/capi-context-motion.spec index 3f925dd..a821557 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.1 +Version: 2.0.2 Release: 1 Group: Service/Context License: Apache-2.0 -- 2.7.4 From aca522db62a258adf8494f59f821c673519c110c Mon Sep 17 00:00:00 2001 From: Mu-Woong Lee Date: Fri, 14 Apr 2017 18:47:08 +0900 Subject: [PATCH 10/16] Fix build error caused by not including new Change-Id: I08bea84ff53066b7d1bd017eddfbf2f604ff7677 Signed-off-by: Mu-Woong Lee --- CMakeLists.txt | 2 ++ include/activity_recognition.h | 3 +-- include/gesture_recognition.h | 3 +-- src/Activity.cpp | 12 ++++++------ src/Gesture.cpp | 14 +++++++------- src/TypesInternal.h | 5 ++--- 6 files changed, 19 insertions(+), 20 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 560fe64..304884b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,7 +17,9 @@ INCLUDE_DIRECTORIES( ) ADD_DEFINITIONS(-O2 -Wall -fPIC -flto -fdata-sections -ffunction-sections -fvisibility=hidden) +ADD_DEFINITIONS(-fdiagnostics-color) SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fPIC -Wl,--as-needed -Wl,--gc-sections -Wl,--print-gc-sections") +SET(CMAKE_VERBOSE_MAKEFILE OFF) # Build pkg_check_modules(pkgs REQUIRED ${dependency}) diff --git a/include/activity_recognition.h b/include/activity_recognition.h index a6bfc33..8d3f5cd 100644 --- a/include/activity_recognition.h +++ b/include/activity_recognition.h @@ -25,8 +25,7 @@ * @{ */ -#include -#include +#include #ifdef __cplusplus extern "C" { diff --git a/include/gesture_recognition.h b/include/gesture_recognition.h index ae3bc02..024adfe 100644 --- a/include/gesture_recognition.h +++ b/include/gesture_recognition.h @@ -25,8 +25,7 @@ * @{ */ -#include -#include +#include #ifdef __cplusplus extern "C" { diff --git a/src/Activity.cpp b/src/Activity.cpp index a7cf667..bf30e97 100644 --- a/src/Activity.cpp +++ b/src/Activity.cpp @@ -30,7 +30,7 @@ struct _activity_handle_s { ActivitySensor *sensor; }; -EXTAPI int activity_is_supported(activity_type_e activity, bool* supported) +EXPORT_API int activity_is_supported(activity_type_e activity, bool* supported) { if (supported) *supported = false; @@ -43,7 +43,7 @@ EXTAPI int activity_is_supported(activity_type_e activity, bool* supported) return ERR_NONE; } -EXTAPI int activity_create(activity_h *handle) +EXPORT_API int activity_create(activity_h *handle) { ASSERT_SUPPORTED(FEATURE_ACTIVITY); ASSERT_NOT_NULL(handle); @@ -62,7 +62,7 @@ EXTAPI int activity_create(activity_h *handle) return ERR_NONE; } -EXTAPI int activity_release(activity_h handle) +EXPORT_API int activity_release(activity_h handle) { ASSERT_SUPPORTED(FEATURE_ACTIVITY); ASSERT_NOT_NULL(handle); @@ -73,7 +73,7 @@ EXTAPI int activity_release(activity_h handle) return ERR_NONE; } -EXTAPI int activity_start_recognition(activity_h handle, activity_type_e activity, activity_recognition_cb callback, void *user_data) +EXPORT_API int activity_start_recognition(activity_h handle, activity_type_e activity, activity_recognition_cb callback, void *user_data) { ASSERT_SUPPORTED(FEATURE_ACTIVITY); ASSERT_NOT_NULL(handle); @@ -94,7 +94,7 @@ EXTAPI int activity_start_recognition(activity_h handle, activity_type_e activit return ERR_NONE; } -EXTAPI int activity_stop_recognition(activity_h handle) +EXPORT_API int activity_stop_recognition(activity_h handle) { ASSERT_SUPPORTED(FEATURE_ACTIVITY); ASSERT_NOT_NULL(handle); @@ -104,7 +104,7 @@ EXTAPI int activity_stop_recognition(activity_h handle) return ERR_NONE; } -EXTAPI int activity_get_accuracy(const activity_data_h data, activity_accuracy_e *accuracy) +EXPORT_API int activity_get_accuracy(const activity_data_h data, activity_accuracy_e *accuracy) { ASSERT_SUPPORTED(FEATURE_ACTIVITY); ASSERT_NOT_NULL(data); diff --git a/src/Gesture.cpp b/src/Gesture.cpp index bdb4306..2d91c70 100644 --- a/src/Gesture.cpp +++ b/src/Gesture.cpp @@ -30,7 +30,7 @@ struct _gesture_handle_s { GestureSensor *sensor; }; -EXTAPI int gesture_is_supported(gesture_type_e gesture, bool* supported) +EXPORT_API int gesture_is_supported(gesture_type_e gesture, bool* supported) { if (supported) *supported = false; @@ -43,7 +43,7 @@ EXTAPI int gesture_is_supported(gesture_type_e gesture, bool* supported) return ERR_NONE; } -EXTAPI int gesture_create(gesture_h *handle) +EXPORT_API int gesture_create(gesture_h *handle) { ASSERT_SUPPORTED(FEATURE_GESTURE); ASSERT_NOT_NULL(handle); @@ -62,7 +62,7 @@ EXTAPI int gesture_create(gesture_h *handle) return ERR_NONE; } -EXTAPI int gesture_release(gesture_h handle) +EXPORT_API int gesture_release(gesture_h handle) { ASSERT_SUPPORTED(FEATURE_GESTURE); ASSERT_NOT_NULL(handle); @@ -73,7 +73,7 @@ EXTAPI int gesture_release(gesture_h handle) return ERR_NONE; } -EXTAPI int gesture_start_recognition(gesture_h handle, gesture_type_e gesture, gesture_option_e option, gesture_recognition_cb callback, void *user_data) +EXPORT_API int gesture_start_recognition(gesture_h handle, gesture_type_e gesture, gesture_option_e option, gesture_recognition_cb callback, void *user_data) { ASSERT_SUPPORTED(FEATURE_GESTURE); ASSERT_NOT_NULL(handle); @@ -102,7 +102,7 @@ EXTAPI int gesture_start_recognition(gesture_h handle, gesture_type_e gesture, g return ERR_NONE; } -EXTAPI int gesture_stop_recognition(gesture_h handle) +EXPORT_API int gesture_stop_recognition(gesture_h handle) { ASSERT_SUPPORTED(FEATURE_GESTURE); ASSERT_NOT_NULL(handle); @@ -112,7 +112,7 @@ EXTAPI int gesture_stop_recognition(gesture_h handle) return ERR_NONE; } -EXTAPI int gesture_get_event(const gesture_data_h data, gesture_event_e *event) +EXPORT_API int gesture_get_event(const gesture_data_h data, gesture_event_e *event) { ASSERT_SUPPORTED(FEATURE_GESTURE); ASSERT_NOT_NULL(data); @@ -126,7 +126,7 @@ EXTAPI int gesture_get_event(const gesture_data_h data, gesture_event_e *event) return ERR_NONE; } -EXTAPI int gesture_get_tilt(const gesture_data_h data, int *x, int *y) +EXPORT_API int gesture_get_tilt(const gesture_data_h data, int *x, int *y) { ASSERT_SUPPORTED(FEATURE_GESTURE); ASSERT_NOT_NULL(data); diff --git a/src/TypesInternal.h b/src/TypesInternal.h index bde7980..7f5dac1 100644 --- a/src/TypesInternal.h +++ b/src/TypesInternal.h @@ -18,10 +18,9 @@ #ifndef _MOTION_TYPES_INTERNAL_H_ #define _MOTION_TYPES_INTERNAL_H_ -#include +#include #include - -#define EXTAPI __attribute__ ((visibility("default"))) +#include #define UNDEFINED -1 -- 2.7.4 From 5089ceaa878c428def3a61e0bd72defeb7e78f8e Mon Sep 17 00:00:00 2001 From: Somin Kim Date: Thu, 7 Sep 2017 17:41:56 +0900 Subject: [PATCH 11/16] Added lcov comments for excluding non-related parts regarding TCT coverage Change-Id: I4308f920a7a98020a21c7abe7f424a660ec0643b Signed-off-by: Somin Kim --- src/Activity.cpp | 12 ++++++++++++ src/ActivitySensor.cpp | 5 ++++- src/Gesture.cpp | 14 ++++++++++++++ src/GestureSensor.cpp | 2 ++ src/SensorAdapter.cpp | 2 ++ 5 files changed, 34 insertions(+), 1 deletion(-) diff --git a/src/Activity.cpp b/src/Activity.cpp index bf30e97..7a47297 100644 --- a/src/Activity.cpp +++ b/src/Activity.cpp @@ -36,16 +36,19 @@ EXPORT_API int activity_is_supported(activity_type_e activity, bool* supported) *supported = false; ASSERT_SUPPORTED(FEATURE_ACTIVITY); + //LCOV_EXCL_START ASSERT_NOT_NULL(supported); IF_FAIL_RETURN(IS_VALID_ACTIVITY(activity), ERR_INVALID_PARAMETER); *supported = ActivitySensor::isSupported(activity); return ERR_NONE; + //LCOV_EXCL_STOP } EXPORT_API int activity_create(activity_h *handle) { ASSERT_SUPPORTED(FEATURE_ACTIVITY); + //LCOV_EXCL_START ASSERT_NOT_NULL(handle); _activity_handle_s *hdl = static_cast(malloc(sizeof(_activity_handle_s))); @@ -60,22 +63,26 @@ EXPORT_API int activity_create(activity_h *handle) *handle = hdl; return ERR_NONE; + //LCOV_EXCL_STOP } EXPORT_API int activity_release(activity_h handle) { ASSERT_SUPPORTED(FEATURE_ACTIVITY); + //LCOV_EXCL_START ASSERT_NOT_NULL(handle); delete handle->sensor; free(handle); return ERR_NONE; + //LCOV_EXCL_STOP } EXPORT_API int activity_start_recognition(activity_h handle, activity_type_e activity, activity_recognition_cb callback, void *user_data) { ASSERT_SUPPORTED(FEATURE_ACTIVITY); + //LCOV_EXCL_START ASSERT_NOT_NULL(handle); ASSERT_NOT_NULL(callback); IF_FAIL_RETURN(IS_VALID_ACTIVITY(activity), ERR_INVALID_PARAMETER); @@ -92,25 +99,30 @@ EXPORT_API int activity_start_recognition(activity_h handle, activity_type_e act } return ERR_NONE; + //LCOV_EXCL_STOP } EXPORT_API int activity_stop_recognition(activity_h handle) { ASSERT_SUPPORTED(FEATURE_ACTIVITY); + //LCOV_EXCL_START ASSERT_NOT_NULL(handle); IF_FAIL_RETURN(handle->sensor->stop(), ACTIVITY_ERROR_NOT_STARTED); return ERR_NONE; + //LCOV_EXCL_STOP } EXPORT_API int activity_get_accuracy(const activity_data_h data, activity_accuracy_e *accuracy) { ASSERT_SUPPORTED(FEATURE_ACTIVITY); + //LCOV_EXCL_START ASSERT_NOT_NULL(data); ASSERT_NOT_NULL(accuracy); *accuracy = static_cast(data->accuracy); return ERR_NONE; + //LCOV_EXCL_STOP } diff --git a/src/ActivitySensor.cpp b/src/ActivitySensor.cpp index d275d5d..b622508 100644 --- a/src/ActivitySensor.cpp +++ b/src/ActivitySensor.cpp @@ -32,11 +32,12 @@ public: ~ActivityListener() { } - + //LCOV_EXCL_START void onEvent(double timestamp, float* values, int accuracy) { ActivitySensor::onEvent(timestamp, values, accuracy); } + //LCOV_EXCL_STOP }; static ActivityListener __activityListener; @@ -44,6 +45,7 @@ static ActivityListener __activityListener; std::set ActivitySensor::__sensorSet; SensorAdapter ActivitySensor::__sensorAdapter(&__activityListener); +//LCOV_EXCL_START ActivitySensor::ActivitySensor() : __activityType(static_cast(UNDEFINED)), __callback(NULL), @@ -140,3 +142,4 @@ void ActivitySensor::onEvent(double timestamp, float* values, int accuracy) } } } +//LCOV_EXCL_STOP diff --git a/src/Gesture.cpp b/src/Gesture.cpp index 2d91c70..18e6386 100644 --- a/src/Gesture.cpp +++ b/src/Gesture.cpp @@ -36,16 +36,19 @@ EXPORT_API int gesture_is_supported(gesture_type_e gesture, bool* supported) *supported = false; ASSERT_SUPPORTED(FEATURE_GESTURE); + //LCOV_EXCL_START ASSERT_NOT_NULL(supported); IF_FAIL_RETURN(IS_VALID_GESTURE(gesture), ERR_INVALID_PARAMETER); *supported = GestureSensor::isSupported(gesture); return ERR_NONE; + //LCOV_EXCL_STOP } EXPORT_API int gesture_create(gesture_h *handle) { ASSERT_SUPPORTED(FEATURE_GESTURE); + //LCOV_EXCL_START ASSERT_NOT_NULL(handle); _gesture_handle_s *hdl = static_cast(malloc(sizeof(_gesture_handle_s))); @@ -60,22 +63,26 @@ EXPORT_API int gesture_create(gesture_h *handle) *handle = hdl; return ERR_NONE; + //LCOV_EXCL_STOP } EXPORT_API int gesture_release(gesture_h handle) { ASSERT_SUPPORTED(FEATURE_GESTURE); + //LCOV_EXCL_START ASSERT_NOT_NULL(handle); delete handle->sensor; free(handle); return ERR_NONE; + //LCOV_EXCL_STOP } EXPORT_API int gesture_start_recognition(gesture_h handle, gesture_type_e gesture, gesture_option_e option, gesture_recognition_cb callback, void *user_data) { ASSERT_SUPPORTED(FEATURE_GESTURE); + //LCOV_EXCL_START ASSERT_NOT_NULL(handle); ASSERT_NOT_NULL(callback); IF_FAIL_RETURN(IS_VALID_GESTURE(gesture), ERR_INVALID_PARAMETER); @@ -100,21 +107,25 @@ EXPORT_API int gesture_start_recognition(gesture_h handle, gesture_type_e gestur } return ERR_NONE; + //LCOV_EXCL_STOP } EXPORT_API int gesture_stop_recognition(gesture_h handle) { ASSERT_SUPPORTED(FEATURE_GESTURE); + //LCOV_EXCL_START ASSERT_NOT_NULL(handle); IF_FAIL_RETURN(handle->sensor->stop(), GESTURE_ERROR_NOT_STARTED); return ERR_NONE; + //LCOV_EXCL_STOP } EXPORT_API int gesture_get_event(const gesture_data_h data, gesture_event_e *event) { ASSERT_SUPPORTED(FEATURE_GESTURE); + //LCOV_EXCL_START ASSERT_NOT_NULL(data); ASSERT_NOT_NULL(event); @@ -124,11 +135,13 @@ EXPORT_API int gesture_get_event(const gesture_data_h data, gesture_event_e *eve *event = static_cast(data->event); return ERR_NONE; + //LCOV_EXCL_STOP } EXPORT_API int gesture_get_tilt(const gesture_data_h data, int *x, int *y) { ASSERT_SUPPORTED(FEATURE_GESTURE); + //LCOV_EXCL_START ASSERT_NOT_NULL(data); ASSERT_NOT_NULL(x); ASSERT_NOT_NULL(y); @@ -140,4 +153,5 @@ EXPORT_API int gesture_get_tilt(const gesture_data_h data, int *x, int *y) *y = data->tilt_y; return ERR_NONE; + //LCOV_EXCL_STOP } diff --git a/src/GestureSensor.cpp b/src/GestureSensor.cpp index 306b059..0453d65 100644 --- a/src/GestureSensor.cpp +++ b/src/GestureSensor.cpp @@ -19,6 +19,7 @@ using namespace motion; +//LCOV_EXCL_START GestureSensor::GestureSensor() : __gestureType(static_cast(UNDEFINED)), __callback(NULL), @@ -97,3 +98,4 @@ sensor_type_t GestureSensor::__toSensor(gesture_type_e type) return UNKNOWN_SENSOR; } } +//LCOV_EXCL_STOP diff --git a/src/SensorAdapter.cpp b/src/SensorAdapter.cpp index 90cc77b..5b5d422 100644 --- a/src/SensorAdapter.cpp +++ b/src/SensorAdapter.cpp @@ -36,6 +36,7 @@ SensorAdapter::~SensorAdapter() stop(); } +//LCOV_EXCL_START void SensorAdapter::setSensor(sensor_type_t type) { __sensorType = type; @@ -131,3 +132,4 @@ void SensorAdapter::__eventCb(sensor_t sensor, unsigned int eventType, sensor_da SensorAdapter *instance = static_cast(cbData); instance->__onEvent(eventData); } +//LCOV_EXCL_STOP -- 2.7.4 From 62456f1fc64b8df8ee7309fbd17cd8dcaf8b109b Mon Sep 17 00:00:00 2001 From: "kibak.yoon" Date: Tue, 21 Nov 2017 19:21:55 +0900 Subject: [PATCH 12/16] Fix dependency issues that occur while building preload apps on OBS Signed-off-by: kibak.yoon Change-Id: I36d5baa1e225afa8a694b33ae30a2da674270b03 --- packaging/capi-context-motion.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/packaging/capi-context-motion.spec b/packaging/capi-context-motion.spec index a821557..4643e35 100644 --- a/packaging/capi-context-motion.spec +++ b/packaging/capi-context-motion.spec @@ -18,6 +18,7 @@ Requires(postun): /sbin/ldconfig # Backward compatibility Provides: motion +Provides: libcore-context-manager.so.1 %description Tizen Native Motion Recognition API -- 2.7.4 From 5ba7581504b3f6327da4ba775c8ede28c951ac85 Mon Sep 17 00:00:00 2001 From: Somin Kim Date: Wed, 17 Jan 2018 16:28:16 +0900 Subject: [PATCH 13/16] Fix timestamp unit as seconds Change-Id: I6f2a0bf220ac6038d3e9606cd8dbb58709450ccd Signed-off-by: Somin Kim --- src/SensorAdapter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SensorAdapter.cpp b/src/SensorAdapter.cpp index 5b5d422..103c009 100644 --- a/src/SensorAdapter.cpp +++ b/src/SensorAdapter.cpp @@ -124,7 +124,7 @@ double SensorAdapter::__getEpoch(unsigned long long monotonic) void SensorAdapter::__onEvent(sensor_data_t *eventData) { double timestamp = __getEpoch(eventData->timestamp); - __listener->onEvent(timestamp, eventData->values, eventData->accuracy); + __listener->onEvent(timestamp / 1000.0, eventData->values, eventData->accuracy); } void SensorAdapter::__eventCb(sensor_t sensor, unsigned int eventType, sensor_data_t *eventData, void *cbData) -- 2.7.4 From a8c8bd6fb50aef9485330b466ee5b8f7fa0355f8 Mon Sep 17 00:00:00 2001 From: Dewal Agarwal Date: Wed, 20 Nov 2019 16:39:00 +0530 Subject: [PATCH 14/16] Adding: GCOV Package for Coverage Change-Id: Ifc2fe6e5267440410c30de29e4bf81ab278c770c Signed-off-by: Dewal Agarwal --- packaging/capi-context-motion.spec | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/packaging/capi-context-motion.spec b/packaging/capi-context-motion.spec index 4643e35..0da3872 100644 --- a/packaging/capi-context-motion.spec +++ b/packaging/capi-context-motion.spec @@ -29,6 +29,13 @@ Tizen Native Motion Recognition API %build MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'` +%if 0%{?gcov:1} +export CFLAGS+=" -fprofile-arcs -ftest-coverage" +export CXXFLAGS+=" -fprofile-arcs -ftest-coverage" +export FFLAGS+=" -fprofile-arcs -ftest-coverage" +export LDFLAGS+=" -lgcov" +%endif + export CXXFLAGS+=" -Wextra -Wcast-align -Wshadow -Wwrite-strings -Wswitch-default -Wno-unused-parameter" export CXXFLAGS+=" -Wno-empty-body -fomit-frame-pointer -fno-optimize-sibling-calls" export CXXFLAGS+=" -fno-strict-aliasing -fno-unroll-loops -fsigned-char -fstrict-overflow" @@ -36,10 +43,19 @@ export CXXFLAGS+=" -Wnon-virtual-dtor" %cmake . -DMAJORVER=${MAJORVER} -DFULLVER=%{version} make %{?_smp_mflags} +%if 0%{?gcov:1} +mkdir -p gcov-obj +find . -name '*.gcno' -exec cp '{}' gcov-obj ';' +%endif %install %make_install +%if 0%{?gcov:1} +mkdir -p %{buildroot}%{_datadir}/gcov/obj +install -m 0644 gcov-obj/* %{buildroot}%{_datadir}/gcov/obj +%endif + # For backward compatibility ln -s %{name}.pc %{buildroot}/%{_libdir}/pkgconfig/motion.pc ln -s %{name}.pc %{buildroot}/%{_libdir}/pkgconfig/libcore-context-manager.pc @@ -68,3 +84,15 @@ Tizen Native Motion Recognition API (Development) %{_includedir}/*/*.h %{_libdir}/*.so %{_libdir}/pkgconfig/*.pc + +%if 0%{?gcov:1} +%package gcov +Summary: Tizen Native Motion Recognition API (gcov) +Group: Service Framework/Testing + +%description gcov +gcov objects for coverage test + +%files gcov +%{_datadir}/gcov/obj/* +%endif -- 2.7.4 From bea88299df86e2cb660ad689e548905dbe6c98ce Mon Sep 17 00:00:00 2001 From: Abhimanyu Swami Date: Wed, 4 Dec 2019 16:51:34 +0530 Subject: [PATCH 15/16] Native API Reference issues: developer.tizen.org => doc.tizen.org Change-Id: I4e9dd1677576b53f46ad89c5067d1e4e73c11747 Signed-off-by: Abhimanyu Swami --- doc/activity_recognition_doc.h | 2 +- doc/gesture_recognition_doc.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/activity_recognition_doc.h b/doc/activity_recognition_doc.h index 9999971..57e7428 100644 --- a/doc/activity_recognition_doc.h +++ b/doc/activity_recognition_doc.h @@ -121,6 +121,6 @@ * * To ensure your application is only running on the device with specific features, please define the features in your manifest file using the manifest editor in the SDK.\n * - * More details on featuring your application can be found from Feature Element. + * More details on featuring your application can be found from Feature Element. * */ diff --git a/doc/gesture_recognition_doc.h b/doc/gesture_recognition_doc.h index f6adc27..dfc8fa6 100644 --- a/doc/gesture_recognition_doc.h +++ b/doc/gesture_recognition_doc.h @@ -144,6 +144,6 @@ * * To ensure your application is only running on the device with specific features, please define the features in your manifest file using the manifest editor in the SDK.\n * - * More details on featuring your application can be found from Feature Element. + * More details on featuring your application can be found from Feature Element. * */ -- 2.7.4 From 79cd6212c3fda06be83735212a8a6ce6fa76464c Mon Sep 17 00:00:00 2001 From: chakradhar Date: Tue, 11 Aug 2020 16:32:51 +0530 Subject: [PATCH 16/16] 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