+++ /dev/null
-%define MODULE_NAME motion
-%define MODULE_LIBNAME libcore-context-manager
-Name: native-%{MODULE_NAME}-itc
-Summary: Native API Integration TC (%{name})
-Version: 0.1
-Release: 0
-Group: Development/Tools
-License: Apache-2.0
-Source0: %{name}-%{version}.tar.gz
-BuildRequires: pkgconfig(%{MODULE_LIBNAME})
-BuildRequires: pkgconfig(capi-appfw-application)
-BuildRequires: pkgconfig(elementary)
-BuildRequires: pkgconfig(glib-2.0)
-BuildRequires: cmake
-BuildRequires: pkgconfig(capi-base-common)
-BuildRequires: pkgconfig(capi-system-info)
-BuildRequires: pkgconfig(dlog)
-BuildRequires: pkgconfig(dbus-glib-1)
-BuildRequires: pkgconfig(json-glib-1.0)
-BuildRequires: pkgconfig(sensor)
-BuildRequires: pkgconfig(bundle)
-Requires(post): /sbin/ldconfig
-Requires(postun): /sbin/ldconfig
-
-%description
-Native API Integration TC (%{name})
-
-%prep
-%setup -q
-
-%build
-
-%define PREFIX "%{_libdir}/%{name}"
-
-export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
-
-%if %{?ASAN_BUILD:1}0
- %if %{?DEVICE_BUILD_TYPE_MOBILE:1}0
- cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="itc" -DDEVICE_BUILD_TYPE="mobile" -DASANBUILD="true" -DCMAKE_INSTALL_PREFIX=%{_prefix}
- %endif
- %if %{?DEVICE_BUILD_TYPE_WEARABLE:1}0
- cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="itc" -DDEVICE_BUILD_TYPE="wearable" -DASANBUILD="true" -DCMAKE_INSTALL_PREFIX=%{_prefix}
- %endif
- %if %{?DEVICE_BUILD_TYPE_TV:1}0
- cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="itc" -DDEVICE_BUILD_TYPE="tv" -DASANBUILD="true" -DCMAKE_INSTALL_PREFIX=%{_prefix}
- %endif
- %if %{?DEVICE_BUILD_TYPE_TIZENIOT:1}0
- cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="itc" -DDEVICE_BUILD_TYPE="tizeniot" -DASANBUILD="true" -DCMAKE_INSTALL_PREFIX=%{_prefix}
- %endif
-%else
- %if %{?DEVICE_BUILD_TYPE_MOBILE:1}0
- cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="itc" -DDEVICE_BUILD_TYPE="mobile" -DASANBUILD="false" -DCMAKE_INSTALL_PREFIX=%{_prefix}
- %endif
- %if %{?DEVICE_BUILD_TYPE_WEARABLE:1}0
- cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="itc" -DDEVICE_BUILD_TYPE="wearable" -DASANBUILD="false" -DCMAKE_INSTALL_PREFIX=%{_prefix}
- %endif
- %if %{?DEVICE_BUILD_TYPE_TV:1}0
- cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="itc" -DDEVICE_BUILD_TYPE="tv" -DASANBUILD="false" -DCMAKE_INSTALL_PREFIX=%{_prefix}
- %endif
- %if %{?DEVICE_BUILD_TYPE_TIZENIOT:1}0
- cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="itc" -DDEVICE_BUILD_TYPE="tizeniot" -DASANBUILD="false" -DCMAKE_INSTALL_PREFIX=%{_prefix}
- %endif
-%endif
-
-make %{?jobs:-j%jobs}
-
-%install
-rm -rf %{buildroot}
-%make_install
-mkdir -p %{buildroot}/usr/share/license
-cp LICENSE %{buildroot}/usr/share/license/%{name}
-
-mkdir -p %{buildroot}/usr/share/packages/
-cp packaging/itc/native-%{MODULE_NAME}-itc.xml %{buildroot}/usr/share/packages/
-mkdir -p %{buildroot}%{APP_PATH}%{name}/bin
-#cp templates/external_wrapper.sh %{buildroot}%{APP_PATH}%{name}/bin
-%post
-
-%postun
-
-
-%files
-%{APP_PATH}%{name}/*
-/usr/share/packages/native-%{MODULE_NAME}-itc.xml
-/usr/share/license/%{name}
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<manifest xmlns="http://tizen.org/ns/packages" package="native-motion-itc" version="0.1.0" api-version="6.0">
- <label>CoreMotionTest</label>
- <author email="mymail@tizentest.com" href="www.tizentest.com">test</author>
- <description>Native API test Application</description>
- <ui-application appid="native.motion-itc" exec="/usr/apps/native-motion-itc/bin/tct-motion-native" nodisplay="false" multiple="false" type="capp" taskmanage="true">
- <background-category value="background-network"/>
- <background-category value="download"/>
- <background-category value="iot-communication"/>
- <background-category value="location"/>
- <background-category value="media"/>
- <background-category value="sensor"/>
- </ui-application>
-</manifest>
+++ /dev/null
-SET(PKG_NAME "motion")
-
-SET(EXEC_NAME "tct-${PKG_NAME}-native")
-SET(RPM_NAME "native-${PKG_NAME}-itc")
-
-SET(CAPI_LIB "libcore-context-manager")
-SET(TC_SOURCES
- ITs-motion-common.c
- ITs-motion_activity.c
- ITs-motion_gesture.c
-)
-
-PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
- ${CAPI_LIB}
- capi-appfw-application
- dlog
- glib-2.0
- dbus-glib-1
- json-glib-1.0
- capi-base-common
- capi-system-info
- sensor
- bundle
- dlog
-)
-
-INCLUDE_DIRECTORIES(
- ${${CAPI_LIB}_INCLUDE_DIRS}
-)
-
-ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES} ${COMMON_FILE})
-TARGET_LINK_LIBRARIES(${EXEC_NAME}
- ${${CAPI_LIB}_LIBRARIES}
- bundle
-)
-
-INSTALL(PROGRAMS ${EXEC_NAME}
- DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
-)
-
-IF( DEFINED ASAN )
-SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC -Wall -pie -g -fsanitize=address -fsanitize-recover=address -U_FORTIFY_SOURCE -fno-omit-frame-pointer")
-SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -Wl,-fsanitize=address")
-ELSE()
-SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O0 -g -fPIE -Wall")
-SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
-ENDIF()
+++ /dev/null
-//
-// Copyright (c) 2014 Samsung Electronics Co., Ltd.
-//
-// Licensed under the Apache License, Version 2.0 (the License);
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-#include "ITs-motion-common.h"
-
-/** @addtogroup itc-motion
-* @ingroup itc
-* @{
-*/
-
-//Add helper function definitions here
-
-char* MotionGetActivityError(activity_error_e nActivityError)
-{
- char* szActivityError = "Undefined Activity Error";
-
- switch ( nActivityError )
- {
- case ACTIVITY_ERROR_NONE: szActivityError = "ACTIVITY_ERROR_NONE"; break; /**< Successful */
- case ACTIVITY_ERROR_INVALID_PARAMETER: szActivityError = "ACTIVITY_ERROR_INVALID_PARAMETER"; break; /**< Invalid function parameter */
- case ACTIVITY_ERROR_INVALID_OPERATION: szActivityError = "ACTIVITY_ERROR_INVALID_OPERATION"; break; /**< Function not implemented */
- case ACTIVITY_ERROR_OUT_OF_MEMORY: szActivityError = "ACTIVITY_ERROR_OUT_OF_MEMORY"; break; /**< Out of memory */
- case ACTIVITY_ERROR_PERMISSION_DENIED: szActivityError = "ACTIVITY_ERROR_PERMISSION_DENIED"; break; /**< Permission denied */
- case ACTIVITY_ERROR_ALREADY_STARTED: szActivityError = "ACTIVITY_ERROR_ALREADY_STARTED"; break; /**< Recognition is already started */
- case ACTIVITY_ERROR_NOT_STARTED: szActivityError = "ACTIVITY_ERROR_NOT_STARTED"; break; /**< Recognition is not started */
- case ACTIVITY_ERROR_NOT_SUPPORTED: szActivityError = "ACTIVITY_ERROR_NOT_SUPPORTED"; break; /**< Not supported */
- case ACTIVITY_ERROR_OPERATION_FAILED: szActivityError = "ACTIVITY_ERROR_OPERATION_FAILED"; break; /**< Operation failed because of a system error */
- }
-
- return szActivityError;
-}
-
-/**
-* @brief Activity recognizer can detect the following activities.
-* @since_tizen 2.3
-*/
-char* MotionGetActivityType(activity_type_e nActivityType)
-{
- char* szActivityType = "Undefined Activity Type";
-
- switch ( nActivityType )
- {
- case ACTIVITY_STATIONARY: szActivityType = "ACTIVITY_STATIONARY"; break; /**< Stationary */
- case ACTIVITY_WALK: szActivityType = "ACTIVITY_WALK"; break; /**< Walking */
- case ACTIVITY_RUN: szActivityType = "ACTIVITY_RUN"; break; /**< Running */
- case ACTIVITY_IN_VEHICLE: szActivityType = "ACTIVITY_IN_VEHICLE"; break; /**< In a moving vehicle */
- }
-
- return szActivityType;
-}
-
-/**
-* @brief For each activity detected, its accuracy will be one of the followings.
-* @since_tizen 2.3
-*/
-char* MotionGetActivityAccuracy(activity_accuracy_e nAccuracy)
-{
- char* szActivityAccuracy = "Undefined Activity Accuracy";
-
- switch ( nAccuracy )
- {
- case ACTIVITY_ACCURACY_LOW: szActivityAccuracy = "ACTIVITY_ACCURACY_LOW"; break; /**< Not accurate */
- case ACTIVITY_ACCURACY_MID: szActivityAccuracy = "ACTIVITY_ACCURACY_MID"; break; /**< Moderate */
- case ACTIVITY_ACCURACY_HIGH: szActivityAccuracy = "ACTIVITY_ACCURACY_HIGH"; break; /**< Highly accurate */
- }
-
- return szActivityAccuracy;
-}
-
-char* MotionGetGestureError(gesture_error_e nGestureError)
-{
- char* szGestureError = NULL;
-
- switch ( nGestureError )
- {
- case GESTURE_ERROR_NONE: szGestureError = "GESTURE_ERROR_NONE"; break; /**< Successful */
- case GESTURE_ERROR_INVALID_PARAMETER: szGestureError = "GESTURE_ERROR_INVALID_PARAMETER"; break; /**< Invalid function parameter */
- case GESTURE_ERROR_INVALID_OPERATION: szGestureError = "GESTURE_ERROR_INVALID_OPERATION"; break; /**< Function not implemented */
- case GESTURE_ERROR_OUT_OF_MEMORY: szGestureError = "GESTURE_ERROR_OUT_OF_MEMORY"; break; /**< Out of memory */
- case GESTURE_ERROR_PERMISSION_DENIED: szGestureError = "GESTURE_ERROR_PERMISSION_DENIED"; break; /**< Permission denied */
- case GESTURE_ERROR_ALREADY_STARTED: szGestureError = "GESTURE_ERROR_ALREADY_STARTED"; break; /**< Recognition is already started */
- case GESTURE_ERROR_NOT_STARTED: szGestureError = "GESTURE_ERROR_NOT_STARTED"; break; /**< Recognition is not started */
- case GESTURE_ERROR_NOT_SUPPORTED: szGestureError = "GESTURE_ERROR_NOT_SUPPORTED"; break; /**< Not supported */
- case GESTURE_ERROR_OPERATION_FAILED: szGestureError = "GESTURE_ERROR_OPERATION_FAILED"; break; /**< Operation failed because of a system error */
- default: szGestureError = "Undefined Gesture Error"; break;
- }
-
- return szGestureError;
-}
-
-/**
-* @brief Gesture types
-* @since_tizen 2.3
-*/
-char* MotionGetGestureType(gesture_type_e nGestureType)
-{
- char* szGestureType = NULL;
-
- switch ( nGestureType )
- {
- case GESTURE_DOUBLE_TAP: szGestureType = "GESTURE_DOUBLE_TAP"; break; /**< The device is tapped twice */
- case GESTURE_MOVE_TO_EAR: szGestureType = "GESTURE_MOVE_TO_EAR"; break; /**< The device is moved near to an ear */
- case GESTURE_NO_MOVE: szGestureType = "GESTURE_NO_MOVE"; break; /**< The device is being stopped for a while */
- case GESTURE_PICK_UP: szGestureType = "GESTURE_PICK_UP"; break; /**< The device is picked up */
- case GESTURE_SHAKE: szGestureType = "GESTURE_SHAKE"; break; /**< The device is quickly moved back and forth */
- case GESTURE_SNAP: szGestureType = "GESTURE_SNAP"; break; /**< The device is moved along an axis and back */
- case GESTURE_TILT: szGestureType = "GESTURE_TILT"; break; /**< The device is tilted */
- case GESTURE_TURN_FACE_DOWN: szGestureType = "GESTURE_TURN_FACE_DOWN"; break; /**< The device is flipped from face to back */
- default: szGestureType = "Undefined Gesture Type"; break;
- }
-
- return szGestureType;
-}
-
-/**
-* @brief Regarding the type of the gesture, gesture_get_event() returns one of the followings.
-* @since_tizen 2.3
-*/
-char* MotionGetGestureEvent(gesture_event_e nGestureEvent)
-{
- char* szGestureEvent = "Undefined Gesture Event";
-
- switch ( nGestureEvent )
- {
- case GESTURE_EVENT_NONE: szGestureEvent = "GESTURE_EVENT_NONE"; break; /**< The gesture is not detected */
-
- //case GESTURE_EVENT_DETECTED: szGestureEvent = "GESTURE_EVENT_DETECTED"; break; /**< The gesture is detected */
- //case GESTURE_SHAKE_DETECTED: szGestureEvent = "GESTURE_SHAKE_DETECTED"; break; /**< Shake gesture is detected */
- //case GESTURE_SNAP_X_NEGATIVE: szGestureEvent = "GESTURE_SNAP_X_NEGATIVE"; break; /**< -X snap is detected */
- case GESTURE_EVENT_DETECTED: szGestureEvent = "GESTURE_EVENT_DETECTED or GESTURE_SHAKE_DETECTED or GESTURE_SNAP_X_NEGATIVE"; break;
-
- //case GESTURE_SHAKE_FINISHED: szGestureEvent = "GESTURE_SHAKE_FINISHED"; break; /**< Shake gesture finished */
- //case GESTURE_SNAP_X_POSITIVE: szGestureEvent = "GESTURE_SNAP_X_POSITIVE"; break; /**< +X snap is detected */
- case GESTURE_SHAKE_FINISHED: szGestureEvent = "GESTURE_SHAKE_FINISHED or GESTURE_SNAP_X_POSITIVE"; break;
-
- case GESTURE_SNAP_Y_NEGATIVE: szGestureEvent = "GESTURE_SNAP_Y_NEGATIVE"; break; /**< -Y snap is detected */
- case GESTURE_SNAP_Y_POSITIVE: szGestureEvent = "GESTURE_SNAP_Y_POSITIVE"; break; /**< +Y snap is detected */
- case GESTURE_SNAP_Z_NEGATIVE: szGestureEvent = "GESTURE_SNAP_Z_NEGATIVE"; break; /**< -Z snap is detected */
- case GESTURE_SNAP_Z_POSITIVE: szGestureEvent = "GESTURE_SNAP_Z_POSITIVE"; break; /**< +Z snap is detected */
- }
-
- return szGestureEvent;
-}
-
-/**
-* @brief Regarding the type of the gesture, gesture_get_event() returns one of the followings.
-* @since_tizen 2.3
-*/
-char* MotionGetGestureEvent2(gesture_type_e nGestureType, gesture_event_e nGestureEvent)
-{
- char* szGestureEvent = NULL;
-
- if ( nGestureEvent == GESTURE_EVENT_NONE )
- {
- szGestureEvent = "GESTURE_EVENT_NONE"; /**< The gesture is not detected */
- }
- else if ( nGestureEvent == GESTURE_EVENT_DETECTED )
- {
- szGestureEvent = "GESTURE_EVENT_DETECTED"; /**< The gesture is detected */
- }
- else
- {
- switch ( nGestureType )
- {
- case GESTURE_DOUBLE_TAP: szGestureEvent = "GESTURE_DOUBLE_TAP"; break;
- case GESTURE_MOVE_TO_EAR: szGestureEvent = "GESTURE_MOVE_TO_EAR"; break;
- case GESTURE_NO_MOVE: szGestureEvent = "GESTURE_NO_MOVE"; break;
- case GESTURE_PICK_UP: szGestureEvent = "GESTURE_PICK_UP"; break;
- case GESTURE_SHAKE:
- switch ( nGestureEvent )
- {
- case GESTURE_SHAKE_DETECTED: szGestureEvent = "GESTURE_SHAKE_DETECTED"; break; /**< Shake gesture is detected */
- case GESTURE_SHAKE_FINISHED: szGestureEvent = "GESTURE_SHAKE_FINISHED"; break; /**< Shake gesture finished */
- default: szGestureEvent = "Undefined Shake Event"; break;
- }
- break;
- case GESTURE_SNAP:
- switch ( nGestureEvent )
- {
- case GESTURE_SNAP_X_NEGATIVE: szGestureEvent = "GESTURE_SNAP_X_NEGATIVE"; break; /**< -X snap is detected */
- case GESTURE_SNAP_X_POSITIVE: szGestureEvent = "GESTURE_SNAP_X_POSITIVE"; break; /**< +X snap is detected */
- case GESTURE_SNAP_Y_NEGATIVE: szGestureEvent = "GESTURE_SNAP_Y_NEGATIVE"; break; /**< -Y snap is detected */
- case GESTURE_SNAP_Y_POSITIVE: szGestureEvent = "GESTURE_SNAP_Y_POSITIVE"; break; /**< +Y snap is detected */
- case GESTURE_SNAP_Z_NEGATIVE: szGestureEvent = "GESTURE_SNAP_Z_NEGATIVE"; break; /**< -Z snap is detected */
- case GESTURE_SNAP_Z_POSITIVE: szGestureEvent = "GESTURE_SNAP_Z_POSITIVE"; break; /**< +Z snap is detected */
- default: szGestureEvent = "Undefined Snap Event"; break;
- }
- break;
- case GESTURE_TILT: szGestureEvent = "GESTURE_TILT"; break;
- case GESTURE_TURN_FACE_DOWN: szGestureEvent = "GESTURE_TURN_FACE_DOWN"; break;
- default: szGestureEvent = "Undefined Gesture Event"; break;
- }
- }
-
- return szGestureEvent;
-}
-
-/**
-* @brief Gesture recognition option.
-* 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.
-* Using GESTURE_OPTION_ALWAYS_ON disables such power-saving functionalities.
-* @since_tizen 2.3
-*/
-char* MotionGetGestureOption(gesture_option_e nGestureOption)
-{
- char* szGestureOption = "Undefined Gesture Option";
-
- switch ( nGestureOption )
- {
- case GESTURE_OPTION_DEFAULT: szGestureOption = "GESTURE_OPTION_DEFAULT"; break; /**< Running in the default setting */
- case GESTURE_OPTION_ALWAYS_ON: szGestureOption = "GESTURE_OPTION_ALWAYS_ON"; break; /**< Trying to detect gestures always */
- }
-
- return szGestureOption;
-}
-
-
-/**
-* @function MotionTimeout
-* @description Called if some callback is not invoked for a particular MotionTimeout
-* @parameter gpointer data
-* @return gboolean
-*/
-gboolean MotionTimeout(gpointer data)
-{
- GMainLoop *pMainLoop = NULL;
- pMainLoop = (GMainLoop *)data;
- if ( pMainLoop != NULL )
- {
- g_main_loop_quit(g_pMotionMainLoop);
- g_main_loop_unref(g_pMotionMainLoop);
- g_pMotionMainLoop = NULL;
- }
- FPRINTF("[Line : %d][Motion_ITC] Callback Time-out \\n", __LINE__);
- return false;
-}
-/** @} */
+++ /dev/null
-//
-// Copyright (c) 2014 Samsung Electronics Co., Ltd.
-//
-// Licensed under the Apache License, Version 2.0 (the License);
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-#ifndef _ITS_CONTEXT_MANAGER_COMMON_H_
-#define _ITS_CONTEXT_MANAGER_COMMON_H_
-
-
-//Add test package related includes here
-
-#include "tct_common.h"
-
-#include <activity_recognition.h>
-#include <gesture_recognition.h>
-
-#include <glib.h>
-#include <glib-object.h>
-
-#include <stdbool.h>
-
-/** @addtogroup itc-motion
-* @ingroup itc
-* @{
-*/
-
-//Add test package related definitions here
-
-#define API_NAMESPACE "CONTEXT_MANAGER_ITC"
-#define MEMLOG 20
-#define TIMELOG 100
-#define TIMEOUT_CB 10000
-#define MICROSECONDS_PER_SECOND 1000000
-
-#define ACTIVITY_FEATURE "http://tizen.org/feature/sensor.activity_recognition"
-#define GESTURE_FEATURE "http://tizen.org/feature/sensor.gesture_recognition"
-
-bool g_bIsActivityFeatureSupported;
-bool g_bIsGestureFeatureSupported;
-
-GMainLoop *g_pMotionMainLoop;
-
-bool g_bCallbackOccured;
-bool g_bCallbackResult;
-
-activity_type_e g_nActivityType;
-gesture_type_e g_nGestureType;
-
-#define START_TEST {\
- FPRINTF("[Line : %d][%s] Starting test : %s\\n", __LINE__, API_NAMESPACE, __FUNCTION__);\
-}
-
-#define RUN_POLLING_LOOP {\
- g_pMotionMainLoop = g_main_loop_new(NULL, false);\
- nMotionTimeoutId = g_timeout_add(TIMEOUT_CB, MotionTimeout, g_pMotionMainLoop);\
- g_main_loop_run(g_pMotionMainLoop);\
- g_source_remove(nMotionTimeoutId);\
- g_pMotionMainLoop = NULL;\
-}
-
-//Add helper function declarations here
-
-char* MotionGetActivityError(activity_error_e nActivityError);
-char* MotionGetActivityType(activity_type_e nActivityType);
-char* MotionGetActivityAccuracy(activity_accuracy_e nAccuracy);
-char* MotionGetGestureError(gesture_error_e nGestureError);
-char* MotionGetGestureType(gesture_type_e nGestureType);
-char* MotionGetGestureEvent(gesture_event_e nGestureEvent);
-char* MotionGetGestureEvent2(gesture_type_e nGestureType, gesture_event_e nGestureEvent);
-char* MotionGetGestureOption(gesture_option_e nGestureOption);
-gboolean MotionTimeout(gpointer data);
-/** @} */
-#endif //_ITS_CONTEXT_MANAGER_COMMON_H_
+++ /dev/null
-//
-// Copyright (c) 2014 Samsung Electronics Co., Ltd.
-//
-// Licensed under the Apache License, Version 2.0 (the License);
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-#include "ITs-motion-common.h"
-
-/** @addtogroup itc-motion
-* @ingroup itc
-* @{
-*/
-
-//& set: Motion
-
-/**
-* @function ITs_motion_activity_startup
-* @description Called before each test
-* @parameter NA
-* @return NA
-*/
-void ITs_motion_activity_startup(void)
-{
- struct stat stBuff;
- if ( stat(ERR_LOG, &stBuff) == 0 )
- {
- remove(ERR_LOG);
- }
-
-#if DEBUG
- FPRINTF("[Line : %d][%s] TEST SUIT start-up: ITs_Motion\\n", __LINE__, API_NAMESPACE);
-#endif
-
- IS_FEATURE_SUPPORTED(ACTIVITY_FEATURE, g_bIsActivityFeatureSupported, API_NAMESPACE);
- return;
-}
-
-/**
-* @function ITs_motion_activity_cleanup
-* @description Called after each test
-* @parameter NA
-* @return NA
-*/
-void ITs_motion_activity_cleanup(void)
-{
-#if DEBUG
- FPRINTF("[Line : %d][%s] TEST SUIT clean-up: ITs_Motion\\n", __LINE__, API_NAMESPACE);
-#endif
- return;
-}
-
-/**
-* @function activity_recognition_callback
-* @description Called when a activity is recognized
-* @param[in] activity Activity recognized.
-* @param[in] data Detailed information of the recognized activity.
-* @param[in] timestamp The time when the activity is recognized. Epoch time in seconds.
-* @param[in] error An error value. It can be one of the following error values:
-* ACTIVITY_ERROR_NONE, if the operation succeeded.
-* ACTIVITY_ERROR_NOT_SUPPORTED, if the activity is not supported in the current profile.
-* ACTIVITY_ERROR_OPERATION_FAILED, if the operation failed because of a system error.
-* ACTIVITY_ERROR_PERMISSION_DENIED, if the application has no permission to use this.
-* @param[in] user_data The user data had passed to activity_start_recognition().
-*/
-void activity_recognition_callback(activity_type_e activity, const activity_data_h data, double timestamp, activity_error_e error, void *user_data)
-{
-#if DEBUG
- FPRINTF("[Line : %d][%s] Reached context activity callback\\n", __LINE__, API_NAMESPACE);
-#endif
-}
-
-/** @addtogroup itc-motion_activity-testcases
-* @brief Integration testcases for module motion_activity
-* @ingroup itc-motion_activity
-* @{
-*/
-
-//& type: auto
-//& purpose: check if the activity recognizer is supported in the current device
-/**
-* @testcase ITc_activity_is_supported_p
-* @since_tizen 2.3
-* @author SRID(gupta.sanjay)
-* @reviewer SRID(ravi.kumar2)
-* @type auto
-* @description Check if the activity recognizer is supported in the current device
-* @scenario Check if the activity recognizer is supported in the current device
-* @apicovered activity_is_supported
-* @passcase If activity_is_supported is successful
-* @failcase If activity_is_supported or any supporting API fails
-* @precondition NA
-* @postcondition NA
-*/
-int ITc_activity_is_supported_p(void)
-{
- START_TEST;
-
- activity_type_e activity_types[] = { ACTIVITY_STATIONARY, ACTIVITY_WALK, ACTIVITY_RUN, ACTIVITY_IN_VEHICLE };
- int enum_size = sizeof(activity_types) / sizeof(activity_types[0]);
- int enum_counter;
-
- for ( enum_counter=0; enum_counter<enum_size; enum_counter++ )
- {
- bool bSupported;
-
- //Target API
- /**** Check if the activity recognizer is supported in the current device ****/
- int nRet = activity_is_supported(activity_types[enum_counter], &bSupported);
-
- if ( !g_bIsActivityFeatureSupported )
- {
- if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )
- {
- FPRINTF("[Line : %d][%s] activity_is_supported failed to return TIZEN_ERROR_NOT_SUPPORTED for unsupported activity type = %s, error returned = %s\\n",
- __LINE__, API_NAMESPACE, MotionGetActivityType(activity_types[enum_counter]), MotionGetActivityError(nRet));
- return 1;
- }
-
- FPRINTF("[Line : %d][%s] activity_is_supported returned unsupported. Skipping test\\n", __LINE__, API_NAMESPACE);
- return 0;
- }
-
- if ( nRet != ACTIVITY_ERROR_NONE )
- {
- FPRINTF("[Line : %d][%s] activity_is_supported failed for activity type = %s, error returned = %s\\n",
- __LINE__, API_NAMESPACE, MotionGetActivityType(activity_types[enum_counter]), MotionGetActivityError(nRet));
- return 1;
- }
- }
-
- return 0;
-}
-
-//& type: auto
-//& purpose: initialize and release an activity handle
-/**
-* @testcase ITc_activity_create_release_p
-* @since_tizen 2.3
-* @author SRID(gupta.sanjay)
-* @reviewer SRID(ravi.kumar2)
-* @type auto
-* @description Initialize and release an activity handle
-* @scenario Initialize an activity handle\n
-* Release the resources occupied by the activity handle\n
-* @apicovered activity_create, activity_release
-* @passcase If activity_create and activity_release are successful
-* @failcase If activity_create, activity_release or any supporting API fails
-* @precondition NA
-* @postcondition NA
-*/
-int ITc_activity_create_release_p(void)
-{
- START_TEST;
-
- activity_h handle;
-
- //Target API
- /**** Initialize an activity handle ****/
- int nRet = activity_create(&handle);
-
- if ( !g_bIsActivityFeatureSupported )
- {
- if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )
- {
- FPRINTF("[Line : %d][%s] activity_create failed to return TIZEN_ERROR_NOT_SUPPORTED for unsupported feature, error returned = %s\\n",
- __LINE__, API_NAMESPACE, MotionGetActivityError(nRet));
- return 1;
- }
-
- FPRINTF("[Line : %d][%s] activity_create is unsupported. Skipping test\\n", __LINE__, API_NAMESPACE);
- return 0;
- }
-
- PRINT_RESULT(ACTIVITY_ERROR_NONE, nRet, "activity_create", MotionGetActivityError(nRet));
-
- //Target API
- /**** Release the activity handle ****/
- nRet = activity_release(handle);
-
- if ( !g_bIsActivityFeatureSupported )
- {
- if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )
- {
- FPRINTF("[Line : %d][%s] activity_release failed to return TIZEN_ERROR_NOT_SUPPORTED for unsupported feature, error returned = %s\\n",
- __LINE__, API_NAMESPACE, MotionGetActivityError(nRet));
- return 1;
- }
-
- FPRINTF("[Line : %d][%s] activity_release is unsupported. Skipping test\\n", __LINE__, API_NAMESPACE);
- return 0;
- }
-
- PRINT_RESULT(ACTIVITY_ERROR_NONE, nRet, "activity_release", MotionGetActivityError(nRet));
-
- return 0;
-}
-
-//& type: auto
-//& purpose: Start to recognize user activities and then stop receiving activity data
-/**
-* @testcase ITc_activity_start_stop_recognition_p
-* @since_tizen 2.3
-* @author SRID(gupta.sanjay)
-* @reviewer SRID(ravi.kumar2)
-* @type auto
-* @description Start to recognize user activities and then stop receiving activity data
-* @scenario Initialize an activity handle\n
-* Start to recognize user activities\n
-* Stop receiving activity data\n
-* Release the resources occupied by the activity handle
-* @apicovered activity_is_supported, activity_create, activity_start_recognition, activity_stop_recognition, activity_release
-* @passcase If activity_start_recognition and activity_stop_recognition are successful
-* @failcase If activity_start_recognition, activity_stop_recognition or any supporting API fails
-* @precondition NA
-* @postcondition NA
-*/
-int ITc_activity_start_stop_recognition_p(void)
-{
- START_TEST;
-
- activity_type_e activity_type = ACTIVITY_STATIONARY;
-
- //Precondition
- bool bSupported;
- int nRet = activity_is_supported(activity_type, &bSupported);
- if ( !g_bIsActivityFeatureSupported )
- {
- if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )
- {
- FPRINTF("[Line : %d][%s] activity_is_supported failed to return TIZEN_ERROR_NOT_SUPPORTED for unsupported activity type = %s, error returned = %s\\n",
- __LINE__, API_NAMESPACE, MotionGetActivityType(activity_type), MotionGetActivityError(nRet));
- return 1;
- }
-
- FPRINTF("[Line : %d][%s] activity_is_supported returned unsupported. Skipping test\\n", __LINE__, API_NAMESPACE);
- return 0;
- }
- if ( nRet != ACTIVITY_ERROR_NONE )
- {
- FPRINTF("[Line : %d][%s] Precondition API activity_is_supported failed for activity type = %s, error returned = %s\\n",
- __LINE__, API_NAMESPACE, MotionGetActivityType(activity_type), MotionGetActivityError(nRet));
- return 1;
- }
- if ( !bSupported )
- {
- FPRINTF("[Line : %d][%s] activity type = %s is not supported in the current device. Skipping test\\n",
- __LINE__, API_NAMESPACE, MotionGetActivityType(activity_type));
- return 0;
- }
-
- //Create activity handle
- activity_h handle;
- nRet = activity_create(&handle);
- if ( !g_bIsActivityFeatureSupported )
- {
- if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )
- {
- FPRINTF("[Line : %d][%s] activity_create failed to return TIZEN_ERROR_NOT_SUPPORTED for unsupported feature, error returned = %s\\n",
- __LINE__, API_NAMESPACE, MotionGetActivityError(nRet));
- return 1;
- }
-
- FPRINTF("[Line : %d][%s] activity_create is unsupported. Skipping test\\n", __LINE__, API_NAMESPACE);
- return 0;
- }
- if ( nRet != ACTIVITY_ERROR_NONE )
- {
- FPRINTF("[Line : %d][%s] Support API activity_create failed, error returned = %s\\n",
- __LINE__, API_NAMESPACE, MotionGetActivityError(nRet));
- return 1;
- }
-
- //Target API
- /**** Start to recognize user activities ****/
- nRet = activity_start_recognition(handle, activity_type, activity_recognition_callback, NULL);
- if ( !g_bIsActivityFeatureSupported )
- {
- if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )
- {
- FPRINTF("[Line : %d][%s] activity_start_recognition failed to return TIZEN_ERROR_NOT_SUPPORTED for unsupported feature, error returned = %s\\n",
- __LINE__, API_NAMESPACE, MotionGetActivityError(nRet));
- activity_release(handle);
- return 1;
- }
-
- FPRINTF("[Line : %d][%s] activity_start_recognition is unsupported. Skipping test\\n", __LINE__, API_NAMESPACE);
- activity_release(handle);
- return 0;
- }
- if ( nRet != ACTIVITY_ERROR_NONE )
- {
- FPRINTF("[Line : %d][%s] activity_start_recognition failed for activity type = %s, error returned = %s\\n",
- __LINE__, API_NAMESPACE, MotionGetActivityType(activity_type), MotionGetActivityError(nRet));
- activity_release(handle);
- return 1;
- }
-
- //Target API
- /**** Stop receiving activity data ****/
- nRet = activity_stop_recognition(handle);
- if ( !g_bIsActivityFeatureSupported )
- {
- if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )
- {
- FPRINTF("[Line : %d][%s] activity_stop_recognition failed to return TIZEN_ERROR_NOT_SUPPORTED for unsupported feature, error returned = %s\\n",
- __LINE__, API_NAMESPACE, MotionGetActivityError(nRet));
- activity_release(handle);
- return 1;
- }
-
- FPRINTF("[Line : %d][%s] activity_stop_recognition is unsupported. Skipping test\\n", __LINE__, API_NAMESPACE);
- activity_release(handle);
- return 0;
- }
- if ( nRet != ACTIVITY_ERROR_NONE )
- {
- FPRINTF("[Line : %d][%s] activity_stop_recognition failed for activity type = %s, error returned = %s\\n",
- __LINE__, API_NAMESPACE, MotionGetActivityType(activity_type), MotionGetActivityError(nRet));
- activity_release(handle);
- return 1;
- }
-
- //Release activity handle
- nRet = activity_release(handle);
- if ( !g_bIsActivityFeatureSupported )
- {
- if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )
- {
- FPRINTF("[Line : %d][%s] activity_release failed to return TIZEN_ERROR_NOT_SUPPORTED for unsupported feature, error returned = %s\\n",
- __LINE__, API_NAMESPACE, MotionGetActivityError(nRet));
- return 1;
- }
-
- FPRINTF("[Line : %d][%s] activity_release is unsupported. Skipping test\\n", __LINE__, API_NAMESPACE);
- return 0;
- }
- if ( nRet != ACTIVITY_ERROR_NONE )
- {
- FPRINTF("[Line : %d][%s] Support API activity_release failed, error returned = %s\\n", __LINE__, API_NAMESPACE, MotionGetActivityError(nRet));
- return 1;
- }
-
- return 0;
-}
-
-/** @} */
-/** @} */
+++ /dev/null
-//
-// Copyright (c) 2014 Samsung Electronics Co., Ltd.
-//
-// Licensed under the Apache License, Version 2.0 (the License);
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-#include "ITs-motion-common.h"
-
-/** @addtogroup itc-motion
-* @ingroup itc
-* @{
-*/
-
-//& set: Motion
-
-/**
-* @function ITs_motion_gesture_startup
-* @description Called before each test
-* @parameter NA
-* @return NA
-*/
-void ITs_motion_gesture_startup(void)
-{
- struct stat stBuff;
- if ( stat(ERR_LOG, &stBuff) == 0 )
- {
- remove(ERR_LOG);
- }
-
-#if DEBUG
- FPRINTF("[Line : %d][%s] TEST SUIT start-up: ITs_Motion_p\\n", __LINE__, API_NAMESPACE);
-#endif
-
- IS_FEATURE_SUPPORTED(GESTURE_FEATURE, g_bIsGestureFeatureSupported, API_NAMESPACE);
- return;
-}
-
-/**
-* @function ITs_motion_gesture_cleanup
-* @description Called after each test
-* @parameter NA
-* @return NA
-*/
-void ITs_motion_gesture_cleanup(void)
-{
-#if DEBUG
- FPRINTF("[Line : %d][%s] TEST SUIT clean-up: ITs_Motion_p\\n", __LINE__, API_NAMESPACE);
-#endif
- return;
-}
-
-/**
-* @function gesture_recognition_callback_check_type
-* @description Called when a gesture is detected.
-* @param[in] gesture Gesture type detected.
-* @param[in] data Detailed information of the detected gesture.
-* gesture_get_event() or gesture_get_tilt() can be used to extract the information from data.
-* @param[in] timestamp The time when the gesture is detected. Epoch time in seconds.
-* @param[in] error An error value. It can be one of the following error values:
-* GESTURE_ERROR_NONE, if the operation succeeded.
-* GESTURE_ERROR_NOT_SUPPORTED, if the gesture is not supported in the current profile.
-* GESTURE_ERROR_OPERATION_FAILED, if the operation failed because of a system error.
-* GESTURE_ERROR_PERMISSION_DENIED, if the application has no permission to use this.
-* @param[in] user_data The user data had passed to gesture_start_recognition().
-* @precondition gesture_start_recognition()
-*/
-void gesture_recognition_callback_check_type(gesture_type_e gesture, const gesture_data_h data, double timestamp, gesture_error_e error, void *user_data)
-{
-#if DEBUG
- FPRINTF("[Line : %d][%s] Reached context gesture callback\\n", __LINE__, API_NAMESPACE);
-#endif
-
- g_bCallbackOccured = true;
-
- if ( g_pMotionMainLoop )
- {
- g_main_loop_quit(g_pMotionMainLoop);
- g_main_loop_unref(g_pMotionMainLoop);
- g_pMotionMainLoop = NULL;
- }
-
- g_nGestureType = gesture;
- g_bCallbackResult = ( error == GESTURE_ERROR_NONE );
-}
-
-
-/**
-* @function gesture_recognition_callback_check_event
-* @description Called when a gesture is detected.
-* @param[in] gesture Gesture type detected.
-* @param[in] data Detailed information of the detected gesture.
-* gesture_get_event() or gesture_get_tilt() can be used to extract the information from data.
-* @param[in] timestamp The time when the gesture is detected. Epoch time in seconds.
-* @param[in] error An error value. It can be one of the following error values:
-* GESTURE_ERROR_NONE, if the operation succeeded.
-* GESTURE_ERROR_NOT_SUPPORTED, if the gesture is not supported in the current profile.
-* GESTURE_ERROR_OPERATION_FAILED, if the operation failed because of a system error.
-* GESTURE_ERROR_PERMISSION_DENIED, if the application has no permission to use this.
-* @param[in] user_data The user data had passed to gesture_start_recognition().
-* @precondition gesture_start_recognition()
-*/
-void gesture_recognition_callback_check_event(gesture_type_e gesture, const gesture_data_h data, double timestamp, gesture_error_e error, void *user_data)
-{
-#if DEBUG
- FPRINTF("[Line : %d][%s] Reached context gesture callback\\n", __LINE__, API_NAMESPACE);
-#endif
-
- g_bCallbackOccured = true;
-
- if ( g_pMotionMainLoop )
- {
- g_main_loop_quit(g_pMotionMainLoop);
- g_main_loop_unref(g_pMotionMainLoop);
- g_pMotionMainLoop = NULL;
- }
-
- g_nGestureType = gesture;
- if ( error == GESTURE_ERROR_NONE )
- {
- gesture_event_e event;
- int nRet;
-
- //Target API
- /**** Get the gesture event from gesture data received ****/
- nRet = gesture_get_event(data, &event);
- if ( !g_bIsGestureFeatureSupported )
- {
- if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )
- {
- FPRINTF("[Line : %d][%s] gesture_get_event() returned %s error for unsupported feature\\n",
- __LINE__, API_NAMESPACE, MotionGetGestureError(nRet));
- g_bCallbackResult = false;
- }
- }
- if ( nRet != GESTURE_ERROR_NONE )
- {
- FPRINTF("[Line : %d][%s] gesture_get_event failed for gesture type = %s, error returned = %s\\n",
- __LINE__, API_NAMESPACE, MotionGetGestureType(gesture), MotionGetGestureError(nRet));
- g_bCallbackResult = false;
- }
- }
- else
- {
- g_bCallbackResult = false;
- }
-}
-
-/** @addtogroup itc-motion_gesture-testcases
-* @brief Integration testcases for module motion_gesture
-* @ingroup itc-motion_gesture
-* @{
-*/
-
-//& type: auto
-//& purpose: check if the given gesture type is supported in the current profile
-/**
-* @testcase ITc_gesture_is_supported_p
-* @since_tizen 2.3
-* @author SRID(gupta.sanjay)
-* @reviewer SRID(ravi.kumar2)
-* @type auto
-* @description Check if the given gesture type is supported in the current profile
-* @scenario Check whether the gesture is supported or not
-* @apicovered gesture_is_supported
-* @passcase If gesture_is_supported is successful
-* @failcase If gesture_is_supported or any supporting API fails
-* @precondition NA
-* @postcondition NA
-*/
-int ITc_gesture_is_supported_p(void)
-{
- START_TEST;
-
- gesture_type_e gesture_types[] = { GESTURE_DOUBLE_TAP,
- GESTURE_MOVE_TO_EAR, GESTURE_NO_MOVE, GESTURE_PICK_UP,
- GESTURE_SHAKE, GESTURE_SNAP, GESTURE_TILT, GESTURE_TURN_FACE_DOWN };
- int enum_size = sizeof(gesture_types) / sizeof(gesture_types[0]);
- int enum_counter;
-
- for ( enum_counter=0; enum_counter < enum_size; enum_counter++ )
- {
- bool bSupported;
-
- //Target API
- /**** Check whether the gesture is supported or not ****/
- int nRet = gesture_is_supported(gesture_types[enum_counter], &bSupported);
- if ( !g_bIsGestureFeatureSupported )
- {
- if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )
- {
- FPRINTF("[Line : %d][%s] gesture_is_supported failed to return TIZEN_ERROR_NOT_SUPPORTED for unsupported gesture type = %s, error returned = %s\\n",
- __LINE__, API_NAMESPACE, MotionGetGestureType(gesture_types[enum_counter]), MotionGetGestureError(nRet));
- return 1;
- }
-
- FPRINTF("[Line : %d][%s] gesture_is_supported returned unsupported for gesture type = %s. Skipping test\\n",
- __LINE__, API_NAMESPACE, MotionGetGestureType(gesture_types[enum_counter]));
- continue;
- }
- if ( nRet != GESTURE_ERROR_NONE )
- {
- FPRINTF("[Line : %d][%s] gesture_is_supported failed for gesture type = %s, error returned = %s\\n",
- __LINE__, API_NAMESPACE, MotionGetGestureType(gesture_types[enum_counter]), MotionGetGestureError(nRet));
- return 1;
- }
- }
-
- return 0;
-}
-
-//& type: auto
-//& purpose: initialize and release a gesture handle
-/**
-* @testcase ITc_gesture_create_release_p
-* @since_tizen 2.3
-* @author SRID(gupta.sanjay)
-* @reviewer SRID(ravi.kumar2)
-* @type auto
-* @description Initialize and release a gesture handle
-* @scenario Initialize a gesture handle\n
-* Release the resources occupied by the gesture handle
-* @apicovered gesture_create, gesture_release
-* @passcase If gesture_create and gesture_release are successful
-* @failcase If gesture_create, gesture_release or any supporting API fails
-* @precondition NA
-* @postcondition NA
-*/
-int ITc_gesture_create_release_p(void)
-{
- START_TEST;
-
- gesture_h handle;
-
- //Target API
- /**** Initialize a gesture handle ****/
- int nRet = gesture_create(&handle);
- if ( !g_bIsGestureFeatureSupported )
- {
- if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )
- {
- FPRINTF("[Line : %d][%s] gesture_create failed to return TIZEN_ERROR_NOT_SUPPORTED for unsupported feature, error returned = %s\\n",
- __LINE__, API_NAMESPACE, MotionGetGestureError(nRet));
- return 1;
- }
-
- FPRINTF("[Line : %d][%s] gesture_create is unsupported. Skipping test\\n", __LINE__, API_NAMESPACE);
- return 0;
- }
-
- PRINT_RESULT(GESTURE_ERROR_NONE, nRet, "gesture_create", MotionGetGestureError(nRet));
-
- //Target API
- /**** Release the gesture handle ****/
- nRet = gesture_release(handle);
- if ( !g_bIsGestureFeatureSupported )
- {
- if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )
- {
- FPRINTF("[Line : %d][%s] gesture_release returned %s error for unsupported feature\\n",
- __LINE__, API_NAMESPACE, MotionGetGestureError(nRet));
- return 1;
- }
-
- FPRINTF("[Line : %d][%s] gesture_release is unsupported. Skipping test\\n", __LINE__, API_NAMESPACE);
- return 0;
- }
-
- PRINT_RESULT(GESTURE_ERROR_NONE, nRet, "gesture_release", MotionGetGestureError(nRet));
-
- return 0;
-}
-
-//& type: auto
-//& purpose: start to detect a gesture and then stop detecting the gesture registered to the gesture handle
-/**
-* @testcase ITc_gesture_start_stop_recognition_p
-* @since_tizen 2.3
-* @author SRID(gupta.sanjay)
-* @reviewer SRID(ravi.kumar2)
-* @type auto
-* @description Start to detect a gesture and then stop detecting the gesture registered to the gesture handle
-* @scenario Initialize a gesture handle\n
-* Start to detect a gesture\n
-* Stop detecting the gesture registered to the gesture handle\n
-* Release the resources occupied by the gesture handle
-* @apicovered gesture_create, gesture_start_recognition, gesture_stop_recognition, gesture_release
-* @passcase If gesture_start_recognition and gesture_stop_recognition are successful
-* @failcase If gesture_start_recognition, gesture_stop_recognition or any supporting API fails
-* @precondition NA
-* @postcondition NA
-*/
-int ITc_gesture_start_stop_recognition_p(void)
-{
- START_TEST;
-
- gesture_type_e gesture_type = GESTURE_NO_MOVE;
- gesture_option_e gesture_option = GESTURE_OPTION_ALWAYS_ON;
-
- //Precondition
- bool bSupported;
- int nRet = gesture_is_supported(gesture_type, &bSupported);
- if ( !g_bIsGestureFeatureSupported )
- {
- if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )
- {
- FPRINTF("[Line : %d][%s] gesture_is_supported failed to return TIZEN_ERROR_NOT_SUPPORTED for unsupported gesture type = %s, error returned = %s\\n",
- __LINE__, API_NAMESPACE, MotionGetGestureType(gesture_type), MotionGetGestureError(nRet));
- return 1;
- }
-
- FPRINTF("[Line : %d][%s] gesture_is_supported returned unsupported. Skipping test\\n", __LINE__, API_NAMESPACE);
- return 0;
- }
- if ( nRet != GESTURE_ERROR_NONE )
- {
- FPRINTF("[Line : %d][%s] Precondition API gesture_is_supported failed for gesture type = %s, error returned = %s\\n",
- __LINE__, API_NAMESPACE, MotionGetGestureType(gesture_type), MotionGetGestureError(nRet));
- return 1;
- }
- if ( !bSupported )
- {
- FPRINTF("[Line : %d][%s] gesture type = %s is not supported in the current device. Skipping test\\n",
- __LINE__, API_NAMESPACE, MotionGetGestureType(gesture_type));
- return 0;
- }
-
- int nMotionTimeoutId = 0;
-
- //Create gesture handle
- gesture_h handle;
- nRet = gesture_create(&handle);
- if ( !g_bIsGestureFeatureSupported )
- {
- if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )
- {
- FPRINTF("[Line : %d][%s] gesture_create failed to return TIZEN_ERROR_NOT_SUPPORTED for unsupported feature, error returned = %s\\n",
- __LINE__, API_NAMESPACE, MotionGetGestureError(nRet));
- return 1;
- }
-
- FPRINTF("[Line : %d][%s] gesture_create is unsupported. Skipping test\\n", __LINE__, API_NAMESPACE);
- return 0;
- }
- if ( nRet != GESTURE_ERROR_NONE )
- {
- FPRINTF("[Line : %d][%s] Precondition API gesture_create failed, error returned = %s\\n", __LINE__, API_NAMESPACE, MotionGetGestureError(nRet));
- return 1;
- }
-
- g_bCallbackOccured = false;
- g_bCallbackResult = false;
-
- //Target API
- /**** Start to detect a gesture ****/
- nRet = gesture_start_recognition(handle, gesture_type, gesture_option, gesture_recognition_callback_check_type, NULL);
- if ( !g_bIsGestureFeatureSupported )
- {
- if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )
- {
- FPRINTF("[Line : %d][%s] gesture_start_recognition failed to return TIZEN_ERROR_NOT_SUPPORTED for unsupported feature, error returned = %s\\n",
- __LINE__, API_NAMESPACE, MotionGetGestureError(nRet));
- gesture_release(handle);
- return 1;
- }
-
- FPRINTF("[Line : %d][%s] gesture_start_recognition is unsupported. Skipping test\\n", __LINE__, API_NAMESPACE);
- gesture_release(handle);
- return 0;
- }
- if ( nRet != GESTURE_ERROR_NONE )
- {
- FPRINTF("[Line : %d][%s] gesture_start_recognition failed for gesture type = %s and gesture option = %s, error returned = %s\\n",
- __LINE__, API_NAMESPACE, MotionGetGestureType(gesture_type), MotionGetGestureOption(gesture_option), MotionGetGestureError(nRet));
- gesture_release(handle);
- return 1;
- }
-
- RUN_POLLING_LOOP;
-
- if ( !g_bCallbackOccured )
- {
- FPRINTF("[Line : %d][%s] gesture_start_recognition failed to invoke callback for gesture type = %s and gesture option = %s\\n",
- __LINE__, API_NAMESPACE, MotionGetGestureType(gesture_type), MotionGetGestureOption(gesture_option));
- gesture_stop_recognition(handle);
- gesture_release(handle);
- return 1;
- }
- else if ( !g_bCallbackResult )
- {
- FPRINTF("[Line : %d][%s] gesture_start_recognition invoked callback with invalid result for gesture type = %s and gesture option = %s\\n",
- __LINE__, API_NAMESPACE, MotionGetGestureType(gesture_type), MotionGetGestureOption(gesture_option));
- gesture_stop_recognition(handle);
- gesture_release(handle);
- return 1;
- }
- else if ( g_nGestureType != gesture_type )
- {
- FPRINTF("[Line : %d][%s] gesture_start_recognition invoked callback with mismatched gesture type for gesture type = %s and gesture option = %s, gesture type returned is = %s\\n",
- __LINE__, API_NAMESPACE, MotionGetGestureType(gesture_type), MotionGetGestureOption(gesture_option), MotionGetGestureType(g_nGestureType));
- gesture_stop_recognition(handle);
- gesture_release(handle);
- return 1;
- }
-
-
- g_bCallbackOccured = false;
-
- //Target API
- /**** Stop detecting the gesture registered to the gesture handle ****/
- nRet = gesture_stop_recognition(handle);
- if ( !g_bIsGestureFeatureSupported )
- {
- if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )
- {
- FPRINTF("[Line : %d][%s] gesture_stop_recognition failed to return TIZEN_ERROR_NOT_SUPPORTED for unsupported feature, error returned = %s\\n",
- __LINE__, API_NAMESPACE, MotionGetGestureError(nRet));
- gesture_release(handle);
- return 1;
- }
-
- FPRINTF("[Line : %d][%s] gesture_stop_recognition is unsupported. Skipping test\\n", __LINE__, API_NAMESPACE);
- gesture_release(handle);
- return 0;
- }
- if ( nRet != GESTURE_ERROR_NONE )
- {
- FPRINTF("[Line : %d][%s] gesture_stop_recognition failed for gesture type = %s and gesture option = %s, error returned = %s\\n",
- __LINE__, API_NAMESPACE, MotionGetGestureType(gesture_type), MotionGetGestureOption(gesture_option), MotionGetGestureError(nRet));
- gesture_release(handle);
- return 1;
- }
-
- RUN_POLLING_LOOP;
-
- if ( g_bCallbackOccured )
- {
- FPRINTF("[Line : %d][%s] gesture_stop_recognition failed to stop callback for gesture type = %s and gesture option = %s\\n",
- __LINE__, API_NAMESPACE, MotionGetGestureType(gesture_type), MotionGetGestureOption(gesture_option));
- gesture_release(handle);
- return 1;
- }
-
- //Release gesture handle
- nRet = gesture_release(handle);
- if ( !g_bIsGestureFeatureSupported )
- {
- if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )
- {
- FPRINTF("[Line : %d][%s] gesture_release failed to return TIZEN_ERROR_NOT_SUPPORTED for unsupported feature, error returned = %s\\n",
- __LINE__, API_NAMESPACE, MotionGetGestureError(nRet));
- return 1;
- }
-
- FPRINTF("[Line : %d][%s] gesture_release is unsupported. Skipping test\\n", __LINE__, API_NAMESPACE);
- return 0;
- }
- if ( nRet != GESTURE_ERROR_NONE )
- {
- FPRINTF("[Line : %d][%s] Support API gesture_release failed, error returned = %s\\n", __LINE__, API_NAMESPACE, MotionGetGestureError(nRet));
- return 1;
- }
-
- return 0;
-}
-
-//& type: auto
-//& purpose: get the gesture event from gesture data received
-/**
-* @testcase ITc_gesture_get_event_p
-* @since_tizen 2.3
-* @author SRID(gupta.sanjay)
-* @reviewer SRID(ravi.kumar2)
-* @type auto
-* @description Get the gesture event from gesture data received
-* @scenario Initialize a gesture handle\n
-* Start to detect a gesture\n
-* Get the gesture event from gesture data received\n
-* Stop detecting the gesture registered to the gesture handle\n
-* Release the resources occupied by the gesture handle
-* @apicovered gesture_create, gesture_start_recognition, gesture_stop_recognition, gesture_release
-* @passcase If gesture_start_recognition, gesture_stop_recognition and gesture_release are successful
-* @failcase If gesture_start_recognition, gesture_stop_recognition and gesture_release or any supporting API fails
-* @precondition NA
-* @postcondition NA
-*/
-int ITc_gesture_get_event_p(void)
-{
- START_TEST;
-
- gesture_type_e gesture_type = GESTURE_NO_MOVE;
- gesture_option_e gesture_option = GESTURE_OPTION_ALWAYS_ON;
-
- //Precondition
- bool bSupported;
- int nRet = gesture_is_supported(gesture_type, &bSupported);
- if ( !g_bIsGestureFeatureSupported )
- {
- if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )
- {
- FPRINTF("[Line : %d][%s] gesture_is_supported failed to return TIZEN_ERROR_NOT_SUPPORTED for unsupported gesture type = %s, error returned = %s\\n",
- __LINE__, API_NAMESPACE, MotionGetGestureType(gesture_type), MotionGetGestureError(nRet));
- return 1;
- }
-
- FPRINTF("[Line : %d][%s] gesture_is_supported returned unsupported. Skipping test\\n", __LINE__, API_NAMESPACE);
- return 0;
- }
- if ( nRet != GESTURE_ERROR_NONE )
- {
- FPRINTF("[Line : %d][%s] Precondition API gesture_is_supported failed for gesture type = %s, error returned = %s\\n",
- __LINE__, API_NAMESPACE, MotionGetGestureType(gesture_type), MotionGetGestureError(nRet));
- return 1;
- }
- if ( !bSupported )
- {
- FPRINTF("[Line : %d][%s] gesture type = %s is not supported in the current device. Skipping test\\n",
- __LINE__, API_NAMESPACE, MotionGetGestureType(gesture_type));
- return 0;
- }
-
- //Create gesture handle
- gesture_h handle;
- nRet = gesture_create(&handle);
- if ( !g_bIsGestureFeatureSupported )
- {
- if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )
- {
- FPRINTF("[Line : %d][%s] gesture_create failed to return TIZEN_ERROR_NOT_SUPPORTED for unsupported feature, error returned = %s\\n",
- __LINE__, API_NAMESPACE, MotionGetGestureError(nRet));
- return 1;
- }
-
- FPRINTF("[Line : %d][%s] gesture_create is unsupported. Skipping test\\n", __LINE__, API_NAMESPACE);
- return 0;
- }
- if ( nRet != GESTURE_ERROR_NONE )
- {
- FPRINTF("[Line : %d][%s] Precondition API gesture_create failed, error returned = %s\\n", __LINE__, API_NAMESPACE, MotionGetGestureError(nRet));
- return 1;
- }
-
- int nMotionTimeoutId = 0;
- g_bCallbackOccured = false;
- g_bCallbackResult = false;
-
- //Start to detect a gesture
- nRet = gesture_start_recognition(handle, gesture_type, gesture_option, gesture_recognition_callback_check_event, NULL);
- if ( !g_bIsGestureFeatureSupported )
- {
- if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )
- {
- FPRINTF("[Line : %d][%s] gesture_start_recognition failed to return TIZEN_ERROR_NOT_SUPPORTED for unsupported feature, error returned = %s\\n",
- __LINE__, API_NAMESPACE, MotionGetGestureError(nRet));
- gesture_release(handle);
- return 1;
- }
-
- FPRINTF("[Line : %d][%s] gesture_start_recognition is unsupported. Skipping test\\n", __LINE__, API_NAMESPACE);
- gesture_release(handle);
- return 0;
- }
- if ( nRet != GESTURE_ERROR_NONE )
- {
- FPRINTF("[Line : %d][%s] Support API gesture_start_recognition failed for gesture type = %s and gesture option = %s, error returned = %s\\n",
- __LINE__, API_NAMESPACE, MotionGetGestureType(gesture_type), MotionGetGestureOption(gesture_option), MotionGetGestureError(nRet));
- gesture_release(handle);
- return 1;
- }
-
- RUN_POLLING_LOOP;
-
- if ( !g_bCallbackOccured )
- {
- FPRINTF("[Line : %d][%s] Support API gesture_start_recognition failed to invoke callback for gesture type = %s and gesture option = %s\\n",
- __LINE__, API_NAMESPACE, MotionGetGestureType(gesture_type), MotionGetGestureOption(gesture_option));
- gesture_stop_recognition(handle);
- gesture_release(handle);
- return 1;
- }
- else if ( !g_bCallbackResult )
- {
- FPRINTF("[Line : %d][%s] Support API gesture_start_recognition invoked callback with invalid result for gesture type = %s and gesture option = %s\\n",
- __LINE__, API_NAMESPACE, MotionGetGestureType(gesture_type), MotionGetGestureOption(gesture_option));
- gesture_stop_recognition(handle);
- gesture_release(handle);
- return 1;
- }
- else if ( g_nGestureType != gesture_type )
- {
- FPRINTF("[Line : %d][%s] gesture_start_recognition invoked callback with mismatched gesture type for gesture type = %s and gesture option = %s, gesture type returned is = %s\\n",
- __LINE__, API_NAMESPACE, MotionGetGestureType(gesture_type), MotionGetGestureOption(gesture_option), MotionGetGestureType(g_nGestureType));
- gesture_stop_recognition(handle);
- gesture_release(handle);
- return 1;
- }
-
- //Stop detecting the gesture registered to the gesture handle
- nRet = gesture_stop_recognition(handle);
- if ( !g_bIsGestureFeatureSupported )
- {
- if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )
- {
- FPRINTF("[Line : %d][%s] gesture_stop_recognition failed to return TIZEN_ERROR_NOT_SUPPORTED for unsupported feature, error returned = %s\\n",
- __LINE__, API_NAMESPACE, MotionGetGestureError(nRet));
- gesture_release(handle);
- return 1;
- }
-
- FPRINTF("[Line : %d][%s] gesture_stop_recognition is unsupported. Skipping test\\n", __LINE__, API_NAMESPACE);
- gesture_release(handle);
- return 0;
- }
- if ( nRet != GESTURE_ERROR_NONE )
- {
- FPRINTF("[Line : %d][%s] Support API gesture_stop_recognition failed for gesture type = %s and gesture option = %s, error returned = %s\\n",
- __LINE__, API_NAMESPACE, MotionGetGestureType(gesture_type), MotionGetGestureOption(gesture_option), MotionGetGestureError(nRet));
- gesture_release(handle);
- return 1;
- }
-
- //Release gesture handle
- nRet = gesture_release(handle);
- if ( !g_bIsGestureFeatureSupported )
- {
- if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )
- {
- FPRINTF("[Line : %d][%s] gesture_release failed to return TIZEN_ERROR_NOT_SUPPORTED for unsupported feature, error returned = %s\\n",
- __LINE__, API_NAMESPACE, MotionGetGestureError(nRet));
- return 1;
- }
-
- FPRINTF("[Line : %d][%s] gesture_release is unsupported. Skipping test\\n", __LINE__, API_NAMESPACE);
- return 0;
- }
- if ( nRet != GESTURE_ERROR_NONE )
- {
- FPRINTF("[Line : %d][%s] Support API gesture_release failed, error returned = %s\\n", __LINE__, API_NAMESPACE, MotionGetGestureError(nRet));
- return 1;
- }
-
- return 0;
-}
-/** @} */
-/** @} */
+++ /dev/null
-//
-// Copyright (c) 2014 Samsung Electronics Co., Ltd.
-//
-// Licensed under the Apache License, Version 2.0 (the License);
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-#include <stdio.h>
-#include <string.h>
-#include "tct_common.h"
-
-#ifdef MOBILE //Starts MOBILE
-#include "tct-motion-native_mobile.h"
-#endif //MOBILE //End MOBILE
-
-#ifdef WEARABLE //Starts WEARABLE
-#include "tct-motion-native_wearable.h"
-#endif //WEARABLE //End WEARABLE
-
-#ifdef TV //Starts TV
-#include "tct-motion-native_tv.h"
-#endif //TV //End TV
-
-#ifdef TIZENIOT //Starts TIZENIOT
-#include "tct-motion-native_tizeniot.h"
-#endif //TIZENIOT //End TIZENIOT
-
-
-#include <malloc.h>
-#include <unistd.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/wait.h>
-#include <glib.h>
-#include <stdbool.h>
-
-#include <app.h>
-#include <dlog.h>
-
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <errno.h>
-
-static bool app_create(void *data)
-{
- return true;
-}
-
-static void app_control(app_control_h app_control, void *data)
-{
- char* pszGetTCName = NULL;
- int i=0, result=0, nRet=0;
- nRet = app_control_get_extra_data(app_control, "testcase_name", &pszGetTCName);
- if(nRet != APP_CONTROL_ERROR_NONE)
- {
- dlog_print(DLOG_ERROR, "NativeTCT", "[%s:%d] app_control_get_extra_data returns error = %d", __FUNCTION__, __LINE__, nRet);
- PRINT_UTC_LOG("\\n[%s][Line : %d]Unable to fetch test case name: app_control_get_extra_data API call fails\\n", __FILE__, __LINE__);
- PRINT_TC_RESULT("%d",1);
- FREE_MEMORY_TC(pszGetTCName);
- return;
- }
-
- dlog_print(DLOG_INFO, "NativeTCT", "[%s:%d] Executing TC Name = %s", __FUNCTION__, __LINE__, pszGetTCName);
- for ( i = 0; tc_array[i].name; i++ )
- {
- if ( 0 == strncmp(pszGetTCName, tc_array[i].name, strlen(pszGetTCName)) )
- {
- dlog_print(DLOG_INFO, "NativeTCT", "%s : Startup begin", pszGetTCName);
- if ( tc_array[i].startup )
- {
- tc_array[i].startup();
- }
- dlog_print(DLOG_INFO, "NativeTCT", "%s : Startup end", pszGetTCName);
-
- dlog_print(DLOG_INFO, "NativeTCT", "%s : Body begin", pszGetTCName);
- result = tc_array[i].function();
- dlog_print(DLOG_INFO, "NativeTCT", "%s returns value = %d", pszGetTCName, result);
- dlog_print(DLOG_INFO, "NativeTCT", "%s : Body end", pszGetTCName);
-
- dlog_print(DLOG_INFO, "NativeTCT", "%s : Cleanup begin", pszGetTCName);
- if ( tc_array[i].cleanup )
- {
- tc_array[i].cleanup();
- }
- dlog_print(DLOG_INFO, "NativeTCT", "%s : Cleanup end", pszGetTCName);
- PRINT_TC_RESULT("%d",result);
- FREE_MEMORY_TC(pszGetTCName);
- return;
- }
- }
-
- dlog_print(DLOG_ERROR, "NativeTCT", "[%s:%d] Unable to execute %s : Unknown Test Case Name", __FUNCTION__, __LINE__, pszGetTCName);
- PRINT_UTC_LOG("\\n[%s][Line : %d]Unable to execute %s : Unknown Test Case Name\\n", __FILE__, __LINE__, pszGetTCName);
- PRINT_TC_RESULT("%d",1);
- FREE_MEMORY_TC(pszGetTCName);
- return;
-}
-
-static void app_terminate(void *data)
-{
- dlog_print(DLOG_INFO, "NativeTCT", "[%s:%d] Application Package is now Terminating", __FUNCTION__, __LINE__);
-}
-
-int main(int argc, char *argv[])
-{
- int ret = 0;
-
- ui_app_lifecycle_callback_s event_callback = {0,};
- event_callback.create = app_create;
- event_callback.terminate = app_terminate;
- event_callback.app_control = app_control;
-
- //setting gcda file location for coverage
- setenv("GCOV_PREFIX","/tmp",1);
- dlog_print(DLOG_INFO, "NativeTCT", "[%s:%d] Coverage *.gcda File location set to /tmp/home/abuild/rpmbuild/BUILD/ ", __FUNCTION__, __LINE__);
-
- dlog_print(DLOG_INFO, "NativeTCT", "[%s:%d] Application Main Function is Invoked", __FUNCTION__, __LINE__);
- ret = ui_app_main(argc, argv, &event_callback, NULL);
- if (ret != APP_ERROR_NONE)
- {
- dlog_print(DLOG_ERROR, "NativeTCT", "Application ui_app_main call gets failed. err = %d", ret);
- PRINT_UTC_LOG("\\n[%s][Line : %d]Application ui_app_main call gets failed. err = %d\\n", __FILE__, __LINE__, ret);
- PRINT_TC_RESULT("%d",1);
- return ret;
- }
-
- dlog_print(DLOG_INFO, "NativeTCT", "[%s:%d] Application Package is Terminated", __FUNCTION__, __LINE__);
- return ret;
-}
+++ /dev/null
-//
-// Copyright (c) 2014 Samsung Electronics Co., Ltd.
-//
-// Licensed under the Apache License, Version 2.0 (the License);
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-#ifndef __TCT_MOTION-NATIVE_H__
-#define __TCT_MOTION-NATIVE_H__
-
-#include "testcase.h"
-#include "tct_common.h"
-
-extern void ITs_motion_activity_startup(void);
-extern void ITs_motion_activity_cleanup(void);
-extern void ITs_motion_gesture_startup(void);
-extern void ITs_motion_gesture_cleanup(void);
-
-extern int ITc_activity_is_supported_p(void);
-extern int ITc_activity_create_release_p(void);
-extern int ITc_activity_start_stop_recognition_p(void);
-extern int ITc_gesture_is_supported_p(void);
-extern int ITc_gesture_create_release_p(void);
-extern int ITc_gesture_start_stop_recognition_p(void);
-extern int ITc_gesture_get_event_p(void);
-
-testcase tc_array[] = {
- {"ITc_activity_is_supported_p",ITc_activity_is_supported_p,ITs_motion_activity_startup,ITs_motion_activity_cleanup},
- {"ITc_activity_create_release_p",ITc_activity_create_release_p,ITs_motion_activity_startup,ITs_motion_activity_cleanup},
- {"ITc_activity_start_stop_recognition_p",ITc_activity_start_stop_recognition_p,ITs_motion_activity_startup,ITs_motion_activity_cleanup},
- {"ITc_gesture_is_supported_p",ITc_gesture_is_supported_p,ITs_motion_gesture_startup,ITs_motion_gesture_cleanup},
- {"ITc_gesture_create_release_p",ITc_gesture_create_release_p,ITs_motion_gesture_startup,ITs_motion_gesture_cleanup},
- {"ITc_gesture_start_stop_recognition_p",ITc_gesture_start_stop_recognition_p,ITs_motion_gesture_startup,ITs_motion_gesture_cleanup},
- {"ITc_gesture_get_event_p",ITc_gesture_get_event_p,ITs_motion_gesture_startup,ITs_motion_gesture_cleanup},
- {NULL, NULL}
-};
-
-#endif // __TCT_MOTION-NATIVE_H__
+++ /dev/null
-//
-// Copyright (c) 2014 Samsung Electronics Co., Ltd.
-//
-// Licensed under the Apache License, Version 2.0 (the License);
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-#ifndef __TCT_MOTION-NATIVE_H__
-#define __TCT_MOTION-NATIVE_H__
-
-#include "testcase.h"
-#include "tct_common.h"
-
-extern void ITs_motion_activity_startup(void);
-extern void ITs_motion_activity_cleanup(void);
-extern void ITs_motion_gesture_startup(void);
-extern void ITs_motion_gesture_cleanup(void);
-
-extern int ITc_activity_is_supported_p(void);
-extern int ITc_activity_create_release_p(void);
-extern int ITc_activity_start_stop_recognition_p(void);
-extern int ITc_gesture_is_supported_p(void);
-extern int ITc_gesture_create_release_p(void);
-extern int ITc_gesture_start_stop_recognition_p(void);
-extern int ITc_gesture_get_event_p(void);
-
-testcase tc_array[] = {
- {"ITc_activity_is_supported_p",ITc_activity_is_supported_p,ITs_motion_activity_startup,ITs_motion_activity_cleanup},
- {"ITc_activity_create_release_p",ITc_activity_create_release_p,ITs_motion_activity_startup,ITs_motion_activity_cleanup},
- {"ITc_activity_start_stop_recognition_p",ITc_activity_start_stop_recognition_p,ITs_motion_activity_startup,ITs_motion_activity_cleanup},
- {"ITc_gesture_is_supported_p",ITc_gesture_is_supported_p,ITs_motion_gesture_startup,ITs_motion_gesture_cleanup},
- {"ITc_gesture_create_release_p",ITc_gesture_create_release_p,ITs_motion_gesture_startup,ITs_motion_gesture_cleanup},
- {"ITc_gesture_start_stop_recognition_p",ITc_gesture_start_stop_recognition_p,ITs_motion_gesture_startup,ITs_motion_gesture_cleanup},
- {"ITc_gesture_get_event_p",ITc_gesture_get_event_p,ITs_motion_gesture_startup,ITs_motion_gesture_cleanup},
- {NULL, NULL}
-};
-
-#endif // __TCT_MOTION-NATIVE_H__
+++ /dev/null
-//
-// Copyright (c) 2014 Samsung Electronics Co., Ltd.
-//
-// Licensed under the Apache License, Version 2.0 (the License);
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-#ifndef __TCT_MOTION-NATIVE_H__
-#define __TCT_MOTION-NATIVE_H__
-
-#include "testcase.h"
-#include "tct_common.h"
-
-extern void ITs_motion_activity_startup(void);
-extern void ITs_motion_activity_cleanup(void);
-extern void ITs_motion_gesture_startup(void);
-extern void ITs_motion_gesture_cleanup(void);
-
-extern int ITc_activity_is_supported_p(void);
-extern int ITc_activity_create_release_p(void);
-extern int ITc_activity_start_stop_recognition_p(void);
-extern int ITc_gesture_is_supported_p(void);
-extern int ITc_gesture_create_release_p(void);
-extern int ITc_gesture_start_stop_recognition_p(void);
-extern int ITc_gesture_get_event_p(void);
-
-testcase tc_array[] = {
- {"ITc_activity_is_supported_p",ITc_activity_is_supported_p,ITs_motion_activity_startup,ITs_motion_activity_cleanup},
- {"ITc_activity_create_release_p",ITc_activity_create_release_p,ITs_motion_activity_startup,ITs_motion_activity_cleanup},
- {"ITc_activity_start_stop_recognition_p",ITc_activity_start_stop_recognition_p,ITs_motion_activity_startup,ITs_motion_activity_cleanup},
- {"ITc_gesture_is_supported_p",ITc_gesture_is_supported_p,ITs_motion_gesture_startup,ITs_motion_gesture_cleanup},
- {"ITc_gesture_create_release_p",ITc_gesture_create_release_p,ITs_motion_gesture_startup,ITs_motion_gesture_cleanup},
- {"ITc_gesture_start_stop_recognition_p",ITc_gesture_start_stop_recognition_p,ITs_motion_gesture_startup,ITs_motion_gesture_cleanup},
- {"ITc_gesture_get_event_p",ITc_gesture_get_event_p,ITs_motion_gesture_startup,ITs_motion_gesture_cleanup},
- {NULL, NULL}
-};
-
-#endif // __TCT_MOTION-NATIVE_H__