+++ /dev/null
-%define MODULE_NAME geofence-manager
-%define MODULE_LIBNAME capi-geofence-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-geofence-manager)
-BuildRequires: pkgconfig(bundle)
-BuildRequires: pkgconfig(glib-2.0)
-BuildRequires: pkgconfig(gmodule-2.0)
-BuildRequires: pkgconfig(dlog)
-BuildRequires: pkgconfig(vconf)
-BuildRequires: pkgconfig(capi-appfw-app-manager)
-BuildRequires: pkgconfig(capi-appfw-package-manager)
-BuildRequires: pkgconfig(pkgmgr-info)
-BuildRequires: pkgconfig(json-glib-1.0)
-BuildRequires: pkgconfig(lbs-dbus)
-BuildRequires: pkgconfig(capi-system-info)
-
-%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/%{name}.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/%{name}.xml
-/usr/share/license/%{name}
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<manifest xmlns="http://tizen.org/ns/packages" package="native-geofence-manager-itc" version="0.1.0" api-version="6.0">
- <label>CoreGeofenceManagerTest</label>
- <author email="mymail@tizentest.com" href="www.tizentest.com">test</author>
- <description>Native API test Application</description>
- <ui-application appid="native.geofence-manager-itc" exec="/usr/apps/native-geofence-manager-itc/bin/tct-geofence-manager-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>
- <privileges>
- <privilege>http://tizen.org/privilege/location</privilege>
- </privileges>
-</manifest>
device
dlog
email
-geofence-manager
http
image-util
iotcon
+++ /dev/null
-SET(PKG_NAME "geofence-manager")
-
-SET(EXEC_NAME "tct-${PKG_NAME}-native")
-SET(RPM_NAME "native-${PKG_NAME}-itc")
-
-SET(CAPI_LIB "capi-geofence-manager")
-SET(TC_SOURCES
- ITs-geofence-manager-common.c
- ITs-geofence-manager.c
- ITs-geofence.c
-)
-
-PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
- ${CAPI_LIB}
- capi-appfw-application
- dlog
- capi-base-common
- bundle
- glib-2.0
- capi-system-info
-)
-
-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-geofence-manager-common.h"
-
-//Add helper function definitions here
-
-/** @addtogroup itc-geofence-manager
-* @ingroup itc
-* @{
-*/
-
-
-/**
- * @function GeofenceManagerGetError
- * @description Maps error enums to string values
- * @parameter nRet : error code returned
- * @return error string
- */
-char* GeofenceManagerGetError(int nRet)
-{
- char *szErrorVal = NULL;
-
- switch ( nRet )
- {
- case GEOFENCE_MANAGER_ERROR_NONE: szErrorVal = "GEOFENCE_MANAGER_ERROR_NONE"; break;
- case GEOFENCE_MANAGER_ERROR_OUT_OF_MEMORY: szErrorVal = "GEOFENCE_MANAGER_ERROR_OUT_OF_MEMORY"; break;
- case GEOFENCE_MANAGER_ERROR_INVALID_PARAMETER: szErrorVal = "GEOFENCE_MANAGER_ERROR_INVALID_PARAMETER"; break;
- case GEOFENCE_MANAGER_ERROR_PERMISSION_DENIED: szErrorVal = "GEOFENCE_MANAGER_ERROR_PERMISSION_DENIED"; break;
- case GEOFENCE_MANAGER_ERROR_NOT_SUPPORTED: szErrorVal = "GEOFENCE_MANAGER_ERROR_NOT_SUPPORTED"; break;
- case GEOFENCE_MANAGER_ERROR_NOT_INITIALIZED: szErrorVal = "GEOFENCE_MANAGER_ERROR_NOT_INITIALIZED"; break;
- //case GEOFENCE_MANAGER_ERROR_ID_NOT_EXIST: szErrorVal = "GEOFENCE_MANAGER_ERROR_ID_NOT_EXIST"; break;
- case GEOFENCE_MANAGER_ERROR_EXCEPTION: szErrorVal = "GEOFENCE_MANAGER_ERROR_EXCEPTION"; break;
- case GEOFENCE_MANAGER_ERROR_ALREADY_STARTED: szErrorVal = "GEOFENCE_MANAGER_ERROR_ALREADY_STARTED"; break;
- case GEOFENCE_MANAGER_ERROR_TOO_MANY_GEOFENCE: szErrorVal = "GEOFENCE_MANAGER_ERROR_TOO_MANY_GEOFENCE"; break;
- case GEOFENCE_MANAGER_ERROR_IPC: szErrorVal = "GEOFENCE_MANAGER_ERROR_IPC"; break;
- case GEOFENCE_MANAGER_ERROR_DATABASE: szErrorVal = "GEOFENCE_MANAGER_ERROR_DATABASE"; break;
- default: szErrorVal = "GEOFENCE_MANAGER_ERROR_UNKNOWN"; break;
- }
- return szErrorVal;
-}
-
-/**
- * @function GeofenceManagerTimeout
- * @description Called if some callback is not invoked for a particular timeout
- * @parameter gpointer data
- * @return gboolean
- */
-gboolean GeofenceManagerTimeout(gpointer data)
-{
- GMainLoop *pMainLoop = NULL;
- pMainLoop = (GMainLoop *)data;
- if ( pMainLoop != NULL )
- {
- g_main_loop_quit(pMainLoop);
- pMainLoop = NULL;
- }
- FPRINTF("[Line : %d][%s] Callback Timeout\\n",__LINE__, API_NAMESPACE);
- return false;
-}
-
-/**
-* @function GeofenceManagerCheckFeature
-* @description Checks if the location feature is supported, unsupported or mismatched
-* @parameter feature : location feature
-* @return feature_check_e value
-*/
-feature_check_e GeofenceManagerCheckFeature(char* feature)
-{
- bool bIsFeatureSupported = TCTCheckSystemInfoFeatureSupported(feature, API_NAMESPACE);
- bool bSupported = false;
-
- int nRet = geofence_manager_is_supported(&bSupported);
- if ( nRet != GEOFENCE_MANAGER_ERROR_NONE )
- {
- FPRINTF("[Line : %d][%s] geofence_manager_is_supported failed for feature %s, error returned = %s\\n", __LINE__, API_NAMESPACE, feature, GeofenceManagerGetError(nRet));
- return FEATURE_MISMATCH;
- }
- if ( bIsFeatureSupported != bSupported )
- {
- FPRINTF("[Line : %d][%s] geofence_manager_is_supported return value (%s) mismatched with expected value (%s) for feature %s\\n", __LINE__, API_NAMESPACE, bSupported ? "true": "false", bIsFeatureSupported ? "true": "false", feature);
- return FEATURE_MISMATCH;
- }
-
- if ( bSupported )
- {
- FPRINTF("[Line : %d][%s] Feature %s is supported on device\\n", __LINE__, API_NAMESPACE, feature);
- return FEATURE_SUPPORTED;
- }
-
- FPRINTF("[Line : %d][%s] Feature %s is unsupported on device. Skipping test\\n", __LINE__, API_NAMESPACE, feature);
-
- return FEATURE_UNSUPPORTED;
-}
-
-/** @addtogroup itc-geofence-common
-* @ingroup itc
-* @{
-*/
-
-/**
- * @function GeofenceEventCB
- * @description Called for geo fence event
- * @parameter int place_id : The location id;geofence_id ;geofence_manager_error_e : The geofence manager error return;user_data : The user data passed from the foreach function
- * @return boolean value
- */
-void GeofenceEventCB(int place_id, int geofence_id, geofence_manager_error_e error, geofence_manage_e manage, void *user_data)
-{
- g_bGeofencemanagerCBFlag = true;
- if(place_id < 0)
- {
- FPRINTF("[Line : %d][%s] place_id is not valid\\n", __LINE__, API_NAMESPACE);
- g_bGeofencemanagerCBParameter = false;
- }
- else if(error != GEOFENCE_MANAGER_ERROR_NONE)
- {
- FPRINTF("[Line : %d][%s] error is not valid\\n", __LINE__, API_NAMESPACE);
- g_bGeofencemanagerCBParameter = false;
- }
- else if(manage < 0)
- {
- FPRINTF("[Line : %d][%s] manage is not valid\\n", __LINE__, API_NAMESPACE);
- g_bGeofencemanagerCBParameter = false;
- }
- else
- {
- g_bGeofencemanagerCBParameter = true;
- }
- g_nPlaceId = place_id;
- if ( g_loop != NULL )
- {
- g_main_loop_quit(g_loop);
- g_loop = NULL;
- }
-}
-
-/**
- * @function GeofenceManagerFenceCB
- * @description Called for geo fence manager callback
- * @parameter geofence_h : The fence;geofence_id ;fence_index : fencing index;user_data : The user data passed from the foreach function
- * @return boolean value
- */
-bool GeofenceManagerFenceCB(int geofence_id, geofence_h fence, int fence_index, int fence_cnt, void *user_data)
-{
- g_bGeofencemanagerCBFlag = true;
- if ( fence == NULL )
- {
- FPRINTF("[Line : %d][%s] handle fence is NULL\\n", __LINE__, API_NAMESPACE);
- g_bGeofencemanagerCBParameter = false;
- }
- else if(geofence_id < 0)
- {
- FPRINTF("[Line : %d][%s] geofence_id is invalid\\n", __LINE__, API_NAMESPACE);
- g_bGeofencemanagerCBParameter = false;
- }
- else if(fence_index < 0)
- {
- FPRINTF("[Line : %d][%s] fence_index is invalid\\n", __LINE__, API_NAMESPACE);
- g_bGeofencemanagerCBParameter = false;
- }
- else if(fence_cnt < 0)
- {
- FPRINTF("[Line : %d][%s] fence_cnt is invalid\\n", __LINE__, API_NAMESPACE);
- g_bGeofencemanagerCBParameter = false;
- }
- else
- {
- g_bGeofencemanagerCBParameter = true;
- }
-
- g_hGeofence = fence;
- g_nGeofenceId = geofence_id;
- if ( g_loop != NULL )
- {
- g_main_loop_quit(g_loop);
- g_loop = NULL;
- }
- return true;
-}
-/** @} */ //end of itc-geofence-manager
\ No newline at end of file
+++ /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_GEOFENCE_MANAGER_COMMON_H_
-#define _ITS_GEOFENCE_MANAGER_COMMON_H_
-
-//Add test package related includes here
-
-#include "tct_common.h"
-#include <geofence_manager.h>
-#include <glib.h>
-#include <app.h>
-
-/** @addtogroup itc-geofence-manager
-* @ingroup itc
-* @{
-*/
-
-#define API_NAMESPACE "GEOFENCE_MANAGER_ITC"
-#define TIMEOUT_CB 30000
-#define PATH_LEN 1024
-#define GMAINTIMEOUT 30000 //30 seconds
-#define LOCATION_GEOFENCE_FEATURE "http://tizen.org/feature/location.geofence"
-
-typedef enum FeatureCheck {
- FEATURE_SUPPORTED = 0,
- FEATURE_UNSUPPORTED,
- FEATURE_MISMATCH
-} feature_check_e;
-
-GMainLoop *g_loop;
-bool g_bIsGeofenceCreated;
-bool g_bGeofencemanagerCBFlag;
-bool g_bFeatureMismatch;
-bool g_bFeatureNotSupported;
-bool g_bGeofencemanagerCBParameter;
-geofence_manager_h g_hGeofenceManager;
-geofence_h g_hGeofence;
-
-int g_nGeofenceId;
-int g_nPlaceId;
-const char *g_pszPlaceName;
-int g_nPlaceIndex;
-int g_nPlaceCnt;
-
-#define START_TEST {\
- FPRINTF("[Line : %d][%s] Starting test : %s\\n", __LINE__, API_NAMESPACE, __FUNCTION__);\
- if ( g_bFeatureNotSupported ) {\
- return 0;\
- }\
- if ( g_bFeatureMismatch ) {\
- return 1;\
- }\
- if ( !g_bIsGeofenceCreated )\
- {\
- return 1;\
- }\
-}
-
-#define RUN_POLLING_LOOP {\
- if ( g_bGeofencemanagerCBFlag == false )\
- {\
- g_loop = g_main_loop_new(NULL, false);\
- nTimeoutId = g_timeout_add(TIMEOUT_CB, GeofenceManagerTimeout, g_loop);\
- g_main_loop_run(g_loop);\
- g_source_remove(nTimeoutId);\
- g_loop = NULL;\
- }\
-}
-
-//Add helper function declarations here
-
-char *GeofenceManagerGetError(int nRet);
-gboolean GeofenceManagerTimeout(gpointer data);
-feature_check_e GeofenceManagerCheckFeature(char* feature);
-void GeofenceEventCB(int place_id, int geofence_id, geofence_manager_error_e error, geofence_manage_e manage, void *user_data);
-bool GeofenceManagerFenceCB(int geofence_id, geofence_h fence, int fence_index, int fence_cnt, void *user_data);
-
-/** @} */ //end of itc-geofence-manager
-#endif //_ITS_GEOFENCE_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-geofence-manager-common.h"
-
-/** @addtogroup itc-geofence-manager
-* @ingroup itc
-* @{
-*/
-
-/**
- * @function GeofenceProximityStateChangedCB
- * @description Called for geofence state change
- * @parameter int geofence_id, geofence_proximity_state_e state, geofence_proximity_provider_e provider, void *user_data
- * @return boolean value
- */
-void GeofenceProximityStateChangedCB(int geofence_id, geofence_proximity_state_e state, geofence_proximity_provider_e provider, void *user_data)
-{
- g_bGeofencemanagerCBFlag = true;
- if(geofence_id < 0)
- {
- FPRINTF("[Line : %d][%s] geofence_id is not valid\\n", __LINE__, API_NAMESPACE);
- g_bGeofencemanagerCBParameter = false;
- }
- else if((state<GEOFENCE_PROXIMITY_STATE_UNCERTAIN)||(state>GEOFENCE_PROXIMITY_STATE_IMMEDIATE))
- {
- FPRINTF("[Line : %d][%s] state is not valid\\n", __LINE__, API_NAMESPACE);
- g_bGeofencemanagerCBParameter = false;
- }
- else
- {
- g_bGeofencemanagerCBParameter = true;
- }
- if ( g_loop != NULL )
- {
- g_main_loop_quit(g_loop);
- g_loop = NULL;
- }
-}
-
-/**
- * @function GeofenceManagerPlaceCB
- * @description Called for geo place event
- * @parameter place_id : The place id;place_name ;place_index;place_cnt;user_data : The user data passed from the foreach function
- * @return boolean value
- */
-bool GeofenceManagerPlaceCB(int place_id, const char *place_name, int place_index, int place_cnt, void *user_data)
-{
- g_bGeofencemanagerCBFlag = true;
- if ( place_name == NULL )
- {
- FPRINTF("[Line : %d][%s] place_name is NULL\\n", __LINE__, API_NAMESPACE);
- g_bGeofencemanagerCBParameter = false;
- }
- else if(place_id < 0)
- {
- FPRINTF("[Line : %d][%s] place_id is invalid\\n", __LINE__, API_NAMESPACE);
- g_bGeofencemanagerCBParameter = false;
- }
- else if(place_index < 0)
- {
- FPRINTF("[Line : %d][%s] place_index is invalid\\n", __LINE__, API_NAMESPACE);
- g_bGeofencemanagerCBParameter = false;
- }
- else if(place_cnt < 0)
- {
- FPRINTF("[Line : %d][%s] place_cnt is invalid\\n", __LINE__, API_NAMESPACE);
- g_bGeofencemanagerCBParameter = false;
- }
- else
- {
- g_bGeofencemanagerCBParameter = true;
- }
- g_pszPlaceName = place_name;
- g_nPlaceIndex = place_index;
- g_nPlaceCnt = place_cnt;
- FPRINTF("[Line : %d][%s] place_name = %s, place_index = %d, place_cnt = %d NULL\\n", __LINE__, API_NAMESPACE,place_name,place_index,place_cnt);
- if ( g_loop != NULL )
- {
- g_main_loop_quit(g_loop);
- g_loop = NULL;
- }
- return true;
-}
-
-/**
- * @function GeofenceStateChangedCB
- * @description Called for geofence state change
- * @parameter geofence_id ;geofence_state_e;user_data : The user data passed from the foreach function
- * @return boolean value
- */
-void GeofenceStateChangedCB(int geofence_id, geofence_state_e state, void *user_data)
-{
- g_bGeofencemanagerCBFlag = true;
- if(geofence_id < 0)
- {
- FPRINTF("[Line : %d][%s] geofence_id is not valid\\n", __LINE__, API_NAMESPACE);
- g_bGeofencemanagerCBParameter = false;
- }
- else if((state<GEOFENCE_STATE_UNCERTAIN)||(state>GEOFENCE_STATE_OUT))
- {
- FPRINTF("[Line : %d][%s] state is not valid\\n", __LINE__, API_NAMESPACE);
- g_bGeofencemanagerCBParameter = false;
- }
- else
- {
- g_bGeofencemanagerCBParameter = true;
- }
- if ( g_loop != NULL )
- {
- g_main_loop_quit(g_loop);
- g_loop = NULL;
- }
-}
-
-/**
- * @function ITs_geofence_manager_startup
- * @description Called before each test
- * @parameter NA
- * @return NA
- */
-void ITs_geofence_manager_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_Geofence_Manager_p\\n", __LINE__, API_NAMESPACE);
-#endif
-
- bool bFeatureSupported;
- g_bFeatureMismatch = g_bFeatureNotSupported = false;
- if ( !TCTCheckSystemInfoFeatureSupported(LOCATION_GEOFENCE_FEATURE, API_NAMESPACE) )
- {
- bFeatureSupported = false;
- }
- else
- {
- bFeatureSupported = true;
- }
-
- g_hGeofenceManager = NULL;
- int nRet = geofence_manager_create(&g_hGeofenceManager);
- FPRINTF("[Line : %d][%s] geofence_manager_create : return %d (%s)\\n", __LINE__, API_NAMESPACE, nRet, GeofenceManagerGetError(nRet));
- if( !bFeatureSupported )
- {
- if( nRet == GEOFENCE_MANAGER_ERROR_NOT_SUPPORTED )
- {
- g_bFeatureNotSupported = true;
- }
- else
- {
- g_bFeatureMismatch = true;
- }
- }
- else
- {
- if ( nRet != GEOFENCE_MANAGER_ERROR_NONE )
- {
- FPRINTF("[Line : %d][%s] geofence_manager_create failed in startup, error returned = %s\\n", __LINE__, API_NAMESPACE, GeofenceManagerGetError(nRet));
- g_bIsGeofenceCreated = false;
- }
- else if(g_hGeofenceManager == NULL)
- {
- FPRINTF("[Line : %d][%s] geofence_manager_create failed in startup, output handle is NULL\\n", __LINE__, API_NAMESPACE);
- g_bIsGeofenceCreated = false;
- }
- else
- {
- g_bIsGeofenceCreated = true;
- }
- }
-
- return;
-}
-
-/**
- * @function ITs_geofence_manager_cleanup
- * @description Called after each test
- * @parameter NA
- * @return NA
- */
-void ITs_geofence_manager_cleanup(void)
-{
-#if DEBUG
- FPRINTF("[Line : %d][%s] TEST SUIT clean-up: ITs_Geofence_Manager_p\\n", __LINE__, API_NAMESPACE);
-#endif
-
- if ( g_bIsGeofenceCreated )
- {
- int nRet = geofence_manager_destroy(g_hGeofenceManager);
- if ( nRet != GEOFENCE_MANAGER_ERROR_NONE )
- {
- FPRINTF("[Line : %d][%s] geofence_manager_destroy failed in cleanup, error returned = %s\\n", __LINE__, API_NAMESPACE, GeofenceManagerGetError(nRet));
- }
- }
-
- return;
-}
-
-/** @addtogroup itc-geofence-manager-testcases
-* @brief Integration testcases for module geofence-manager
-* @ingroup itc-geofence-manager
-* @{
-*/
-
-//& purpose: Set unset geofence event callback
-//& type: auto
-
-/**
- * @testcase ITc_geofence_manager_is_supported_p
- * @since_tizen 2.4
- * @author SRID(gaurav.m2)
- * @reviewer SRID(gupta.sanjay)
- * @type auto
- * @description create geofecne manager
- * @scenario create geofecne manager
- * @apicovered geofence_manager_is_supported
- * @passcase When geofence_manager_create is successful
- * @failcase If target API fails or any precondition API fails
- * @precondition None
- * @postcondition None
- */
-int ITc_geofence_manager_is_supported_p(void)
-{
- START_TEST;
- FPRINTF("[Line : %d][%s] Starting test : %s\\n", __LINE__, API_NAMESPACE, __FUNCTION__);
-
- bool bIsSupported;
-
- //Target API
- int nRet = geofence_manager_is_supported(&bIsSupported);
- PRINT_RESULT(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_manager_is_supported", GeofenceManagerGetError(nRet));
- FPRINTF("[Line : %d][%s] geofence_manager_is_supported returned value = %s\\n", __LINE__, API_NAMESPACE, bIsSupported ? "true" : "false");
-
- return 0;
-}
-
-//& purpose: Set unset geofence event callback
-//& type: auto
-
-/**
- * @testcase ITc_geofence_manager_create_destroy_p
- * @since_tizen 2.4
- * @author SRID(gaurav.m2)
- * @reviewer SRID(gupta.sanjay)
- * @type auto
- * @description create geofecne manager
- * @scenario create geofecne manager
- * @apicovered geofence_manager_create, geofence_manager_destroy
- * @passcase When geofence_manager_create is successful
- * @failcase If target API fails or any precondition API fails
- * @precondition None
- * @postcondition None
- */
-int ITc_geofence_manager_create_destroy_p(void)
-{
- START_TEST;
-
- int nRet = geofence_manager_destroy(g_hGeofenceManager);
- PRINT_RESULT(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_manager_destroy", GeofenceManagerGetError(nRet));
-
- nRet = geofence_manager_create(&g_hGeofenceManager);
- PRINT_RESULT(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_manager_create", GeofenceManagerGetError(nRet));
- CHECK_HANDLE(g_hGeofenceManager, "geofence_manager_create");
-
- return 0;
-}
-
-//& purpose: Set unset geofence event callback
-//& type: auto
-
-/**
- * @testcase ITc_geofence_manager_set_unset_geofence_event_cb_p
- * @since_tizen 2.4
- * @author SRID(gaurav.m2)
- * @reviewer SRID(gupta.sanjay)
- * @type auto
- * @description Set unset geofence event callback
- * @scenario Set unset geofence event callback
- * @apicovered geofence_manager_set_geofence_event_cb, geofence_manager_unset_geofence_event_cb, geofence_manager_remove_place
- * @passcase When geofence_manager_add_place, geofence_manager_set_geofence_event_cb is successful
- * @failcase If target API fails or any precondition API fails
- * @precondition geofence_manager_create
- * @postcondition None
- */
-int ITc_geofence_manager_set_unset_geofence_event_cb_p(void)
-{
- START_TEST;
-
- int nTimeoutId;
- char *pszPlaceName = "SOME_PLACE";
- int nPlaceId = 0;
- g_bGeofencemanagerCBFlag = false;
- g_bGeofencemanagerCBParameter = false;
-
- int nRet = geofence_manager_set_geofence_event_cb(g_hGeofenceManager, GeofenceEventCB, NULL);
- PRINT_RESULT_CLEANUP(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_manager_set_geofence_event_cb", GeofenceManagerGetError(nRet), geofence_manager_remove_place(g_hGeofenceManager, nPlaceId));
-
- nRet = geofence_manager_add_place(g_hGeofenceManager, pszPlaceName, &nPlaceId);
- PRINT_RESULT(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_manager_add_place", GeofenceManagerGetError(nRet));
- CHECK_VALUE_INT(nPlaceId, "geofence_manager_add_place");
-
-
- RUN_POLLING_LOOP;
- if ( !g_bGeofencemanagerCBFlag )
- {
- FPRINTF("[Line : %d][%s] Callback failed [GeofenceEventCB]\\n", __LINE__, API_NAMESPACE);
- geofence_manager_unset_geofence_event_cb(g_hGeofenceManager);
- geofence_manager_remove_place(g_hGeofenceManager, nPlaceId);
- return 1;
- }
- else if ( !g_bGeofencemanagerCBParameter )
- {
- geofence_manager_unset_geofence_event_cb(g_hGeofenceManager);
- geofence_manager_remove_place(g_hGeofenceManager, nPlaceId);
- return 1;
- }
-
- nRet = geofence_manager_unset_geofence_event_cb(g_hGeofenceManager);
- PRINT_RESULT(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_manager_unset_geofence_event_cb", GeofenceManagerGetError(nRet));
-
- nRet = geofence_manager_remove_place(g_hGeofenceManager, nPlaceId);
- PRINT_RESULT_CLEANUP(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_manager_remove_place", GeofenceManagerGetError(nRet), geofence_manager_unset_geofence_event_cb(g_hGeofenceManager));
-
- return 0;
-}
-
-//& purpose: Start stop geofence manager
-//& type: auto
-/**
- * @testcase ITc_geofence_manager_start_stop_p
- * @since_tizen 2.4
- * @author SRID(gaurav.m2)
- * @reviewer SRID(gupta.sanjay)
- * @type auto
- * @description Start stop geofence manager
- * @scenario Start stop geofence manager
- * @apicovered geofence_manager_start, geofence_manager_stop, geofence_manager_unset_geofence_event_cb, geofence_manager_add_place, geofence_manager_remove_place
- * @passcase When geofence_manager_set_geofence_event_cb, geofence_manager_start, geofence_manager_stop, geofence_manager_unset_geofence_event_cb is successful
- * @failcase If target API fails or any precondition API fails
- * @precondition geofence_manager_create
- * @postcondition None
- */
-int ITc_geofence_manager_start_stop_p(void)
-{
- START_TEST;
-
- int nTimeoutId;
- g_bGeofencemanagerCBFlag = false;
- g_bGeofencemanagerCBParameter = false;
- int nPlaceId = 0, nFenceId = 0;
- char *pBssid = "88:30:8A:6C:28:16";
- geofence_h geofenceH = NULL;
- const char *pSsid = "WI-FI";
- char *pszPlaceName = "SOME_PLACE";
-
- int nRet = geofence_manager_add_place(g_hGeofenceManager, pszPlaceName, &nPlaceId);
- PRINT_RESULT(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_manager_add_place", GeofenceManagerGetError(nRet));
- CHECK_VALUE_INT(nPlaceId, "geofence_manager_add_place");
-
- nRet = geofence_create_wifi(nPlaceId, pBssid, pSsid, &geofenceH);
- PRINT_RESULT_CLEANUP(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_create_wifi", GeofenceManagerGetError(nRet),geofence_manager_remove_place(g_hGeofenceManager, nPlaceId));
- CHECK_HANDLE(geofenceH, "geofence_create_wifi");
-
- nRet = geofence_manager_add_fence(g_hGeofenceManager, geofenceH, &nFenceId);
- PRINT_RESULT_CLEANUP(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_manager_add_fence", GeofenceManagerGetError(nRet), geofence_manager_remove_fence(g_hGeofenceManager, nFenceId));
- CHECK_HANDLE(geofenceH, "geofence_manager_add_fence");
- CHECK_VALUE_INT(nFenceId, "geofence_manager_add_fence");
-
- nRet = geofence_manager_set_geofence_state_changed_cb(g_hGeofenceManager, GeofenceStateChangedCB, NULL);
- PRINT_RESULT(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_manager_set_geofence_state_changed_cb", GeofenceManagerGetError(nRet));
-
- nRet = geofence_manager_start(g_hGeofenceManager, nFenceId);
- PRINT_RESULT_CLEANUP(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_manager_start", GeofenceManagerGetError(nRet), geofence_manager_remove_place(g_hGeofenceManager, nPlaceId));
-
- RUN_POLLING_LOOP;
- if ( !g_bGeofencemanagerCBFlag )
- {
- FPRINTF("[Line : %d][%s] Callback failed [GeofenceStateChangedCB]\\n", __LINE__, API_NAMESPACE);
- geofence_manager_unset_geofence_state_changed_cb(g_hGeofenceManager);
- return 1;
- }
- else if ( !g_bGeofencemanagerCBParameter )
- {
- geofence_manager_unset_geofence_state_changed_cb(g_hGeofenceManager);
- return 1;
- }
-
- nRet = geofence_manager_unset_geofence_state_changed_cb(g_hGeofenceManager);
- PRINT_RESULT_CLEANUP(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_manager_unset_geofence_state_changed_cb", GeofenceManagerGetError(nRet), geofence_manager_unset_geofence_event_cb(g_hGeofenceManager));
-
- nRet = geofence_manager_stop(g_hGeofenceManager, nFenceId);
- PRINT_RESULT_CLEANUP(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_manager_stop", GeofenceManagerGetError(nRet), geofence_manager_remove_place(g_hGeofenceManager, nPlaceId));
-
- nRet = geofence_manager_remove_fence(g_hGeofenceManager, nFenceId);
- PRINT_RESULT_CLEANUP(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_manager_remove_fence", GeofenceManagerGetError(nRet), geofence_manager_remove_place(g_hGeofenceManager, nPlaceId));
-
- nRet = geofence_destroy(geofenceH);
- PRINT_RESULT_CLEANUP(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_destroy", GeofenceManagerGetError(nRet), geofence_manager_remove_place(g_hGeofenceManager, nPlaceId));
-
- nRet = geofence_manager_remove_place(g_hGeofenceManager, nPlaceId);
- PRINT_RESULT(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_manager_remove_place", GeofenceManagerGetError(nRet));
-
- return 0;
-}
-
-//& purpose: geofence manager API to add/update/remove place
-//& type: auto
-/**
- * @testcase ITc_geofence_manager_add_update_remove_place_p
- * @since_tizen 2.4
- * @author SRID(gaurav.m2)
- * @reviewer SRID(gupta.sanjay)
- * @type auto
- * @description geofence manager API to add/update/remove place
- * @scenario geofence manager add place\n
- * geofence manager update place\n
- * geofence manager remove
- * @apicovered geofence_manager_add_place, geofence_manager_update_place, geofence_manager_remove_place, geofence_manager_unset_geofence_event_cb
- * @passcase When geofence_manager_add_place, geofence_manager_update_place, geofence_manager_remove_place, geofence_manager_unset_geofence_event_cb is successful
- * @failcase If target API fails or any precondition API fails
- * @precondition geofence_manager_create
- * @postcondition None
- */
-int ITc_geofence_manager_add_update_remove_place_p(void)
-{
- START_TEST;
-
- char *pszPlaceName = "SOME_PLACE";
- int nPlaceId = 0;
- g_bGeofencemanagerCBFlag = false;
-
- int nRet = geofence_manager_add_place(g_hGeofenceManager, pszPlaceName, &nPlaceId);
- PRINT_RESULT(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_manager_add_place", GeofenceManagerGetError(nRet));
-
- nRet = geofence_manager_update_place(g_hGeofenceManager, nPlaceId, pszPlaceName);
- PRINT_RESULT_CLEANUP(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_manager_update_place", GeofenceManagerGetError(nRet), geofence_manager_unset_geofence_event_cb(g_hGeofenceManager));
-
- nRet = geofence_manager_remove_place(g_hGeofenceManager, nPlaceId);
- PRINT_RESULT_CLEANUP(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_manager_remove_place", GeofenceManagerGetError(nRet), geofence_manager_unset_geofence_event_cb(g_hGeofenceManager));
-
- return 0;
-}
-
-//& purpose: set/unset geofence state changed callback
-//& type: auto
-/**
- * @testcase ITc_geofence_manager_set_unset_geofence_state_changed_cb_p
- * @since_tizen 2.4
- * @author SRID(gaurav.m2)
- * @reviewer SRID(gupta.sanjay)
- * @type auto
- * @description geofence manager API to add/update/remove place
- * @scenario set geofence state changed callback\n
- * unset geofence state changed callback
- * @apicovered geofence_manager_add_place, geofence_manager_remove_place, geofence_manager_unset_geofence_event_cb
- * @passcase When geofence_manager_set_geofence_state_changed_cb and geofence_manager_unset_geofence_state_changed_cb is successful
- * @failcase If geofence_manager_set_geofence_state_changed_cb or geofence_manager_unset_geofence_state_changed_cb fails
- * @precondition geofence_manager_create
- * @postcondition None
- */
-int ITc_geofence_manager_set_unset_geofence_state_changed_cb_p(void)
-{
- START_TEST;
-
- int nTimeoutId;
- g_bGeofencemanagerCBFlag = false;
- g_bGeofencemanagerCBParameter = false;
- int nPlaceId = 0, nFenceId = 0;
- char *pBssid = "88:30:8A:6C:28:16";
- geofence_h geofenceH = NULL;
- const char *pSsid = "WI-FI";
- char *pszPlaceName = "SOME_PLACE";
-
- int nRet = geofence_manager_add_place(g_hGeofenceManager, pszPlaceName, &nPlaceId);
- PRINT_RESULT(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_manager_add_place", GeofenceManagerGetError(nRet));
- CHECK_VALUE_INT(nPlaceId, "geofence_manager_add_place");
-
- nRet = geofence_create_wifi(nPlaceId, pBssid, pSsid, &geofenceH);
- PRINT_RESULT_CLEANUP(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_create_wifi", GeofenceManagerGetError(nRet),geofence_manager_remove_place(g_hGeofenceManager, nPlaceId));
- CHECK_HANDLE(geofenceH, "geofence_create_wifi");
-
- nRet = geofence_manager_add_fence(g_hGeofenceManager, geofenceH, &nFenceId);
- PRINT_RESULT_CLEANUP(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_manager_add_fence", GeofenceManagerGetError(nRet), geofence_manager_remove_fence(g_hGeofenceManager, nFenceId));
- CHECK_HANDLE(geofenceH, "geofence_manager_add_fence");
- CHECK_VALUE_INT(nFenceId, "geofence_manager_add_fence");
-
- nRet = geofence_manager_set_geofence_state_changed_cb(g_hGeofenceManager, GeofenceStateChangedCB, NULL);
- PRINT_RESULT(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_manager_set_geofence_state_changed_cb", GeofenceManagerGetError(nRet));
-
- nRet = geofence_manager_start(g_hGeofenceManager, nFenceId);
- PRINT_RESULT_CLEANUP(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_manager_start", GeofenceManagerGetError(nRet), geofence_manager_remove_place(g_hGeofenceManager, nPlaceId));
-
- RUN_POLLING_LOOP;
- if ( !g_bGeofencemanagerCBFlag )
- {
- FPRINTF("[Line : %d][%s] Callback failed [GeofenceStateChangedCB]\\n", __LINE__, API_NAMESPACE);
- geofence_manager_unset_geofence_state_changed_cb(g_hGeofenceManager);
- return 1;
- }
- else if ( !g_bGeofencemanagerCBParameter )
- {
- geofence_manager_unset_geofence_state_changed_cb(g_hGeofenceManager);
- return 1;
- }
-
- nRet = geofence_manager_unset_geofence_state_changed_cb(g_hGeofenceManager);
- PRINT_RESULT_CLEANUP(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_manager_unset_geofence_state_changed_cb", GeofenceManagerGetError(nRet), geofence_manager_unset_geofence_event_cb(g_hGeofenceManager));
-
- nRet = geofence_manager_stop(g_hGeofenceManager, nFenceId);
- PRINT_RESULT_CLEANUP(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_manager_stop", GeofenceManagerGetError(nRet), geofence_manager_remove_place(g_hGeofenceManager, nPlaceId));
-
- nRet = geofence_manager_remove_fence(g_hGeofenceManager, nFenceId);
- PRINT_RESULT_CLEANUP(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_manager_remove_fence", GeofenceManagerGetError(nRet), geofence_manager_remove_place(g_hGeofenceManager, nPlaceId));
-
- nRet = geofence_destroy(geofenceH);
- PRINT_RESULT_CLEANUP(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_destroy", GeofenceManagerGetError(nRet), geofence_manager_remove_place(g_hGeofenceManager, nPlaceId));
-
- nRet = geofence_manager_remove_place(g_hGeofenceManager, nPlaceId);
- PRINT_RESULT(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_manager_remove_place", GeofenceManagerGetError(nRet));
-
- return 0;
-}
-
-//& purpose: add remove fence
-//& type: auto
-/**
- * @testcase ITc_geofence_manager_add_remove_fence_p
- * @since_tizen 2.4
- * @author SRID(gaurav.m2)
- * @reviewer SRID(gupta.sanjay)
- * @type auto
- * @description add remove fence
- * @scenario add remove fence
- * @apicovered geofence_manager_add_fence, geofence_manager_remove_fence, geofence_manager_unset_geofence_event_cb, geofence_manager_add_place, geofence_manager_remove_place
- * @passcase When geofence_manager_add_fence, geofence_manager_remove_fence, geofence_manager_unset_geofence_event_cb is successful
- * @failcase If target API fails or any precondition API fails
- * @precondition geofence_manager_create
- * @postcondition None
- */
-int ITc_geofence_manager_add_remove_fence_p(void)
-{
- START_TEST;
-
- int nPlaceId = 0, nFenceId = 0;
- char *pBssid = "88:30:8A:6C:28:16";
- geofence_h geofenceH = NULL;
- const char *pSsid = "WI-FI";
- char *pszPlaceName = "SOME_PLACE";
-
- int nRet = geofence_manager_add_place(g_hGeofenceManager, pszPlaceName, &nPlaceId);
- PRINT_RESULT(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_manager_add_place", GeofenceManagerGetError(nRet));
- CHECK_VALUE_INT(nPlaceId, "geofence_manager_add_place");
-
- nRet = geofence_create_wifi(nPlaceId, pBssid, pSsid, &geofenceH);
- PRINT_RESULT_CLEANUP(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_create_wifi", GeofenceManagerGetError(nRet),geofence_manager_remove_place(g_hGeofenceManager, nPlaceId));
- CHECK_HANDLE(geofenceH, "geofence_create_wifi");
-
- nRet = geofence_manager_add_fence(g_hGeofenceManager, geofenceH, &nFenceId);
- PRINT_RESULT_CLEANUP(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_manager_add_fence", GeofenceManagerGetError(nRet), geofence_manager_unset_geofence_event_cb(g_hGeofenceManager);geofence_manager_remove_place(g_hGeofenceManager, nPlaceId));
- CHECK_VALUE_INT(nFenceId, "geofence_manager_add_fence");
-
- nRet = geofence_manager_remove_fence(g_hGeofenceManager, nFenceId);
- PRINT_RESULT_CLEANUP(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_manager_remove_fence", GeofenceManagerGetError(nRet), geofence_manager_unset_geofence_event_cb(g_hGeofenceManager);geofence_manager_remove_place(g_hGeofenceManager, nPlaceId));
-
- nRet = geofence_destroy(geofenceH);
- PRINT_RESULT_CLEANUP(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_destroy", GeofenceManagerGetError(nRet), geofence_manager_remove_place(g_hGeofenceManager, nPlaceId));
-
- nRet = geofence_manager_remove_place(g_hGeofenceManager, nPlaceId);
- PRINT_RESULT_CLEANUP(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_manager_remove_place", GeofenceManagerGetError(nRet), geofence_manager_unset_geofence_event_cb(g_hGeofenceManager));
-
- return 0;
-}
-
-//& purpose: Call geofence callback to get geofence list
-//& type: auto
-
-/**
- * @testcase ITc_geofence_manager_foreach_geofence_list_p
- * @since_tizen 2.4
- * @author SRID(gaurav.m2)
- * @reviewer SRID(gupta.sanjay)
- * @type auto
- * @description Call geofence callback to get geofence list
- * @scenario Call geofence callback to get geofence list
- * @apicovered geofence_manager_foreach_geofence_list
- * @passcase When geofence_manager_foreach_geofence_list is successful
- * @failcase If target API fails or any precondition API fails
- * @precondition geofence_manager_create
- * @postcondition None
- */
-int ITc_geofence_manager_foreach_geofence_list_p(void)
-{
- START_TEST;
-
- int nTimeoutId;
- int nPlaceId = 0, nFenceId = 0;
- char *pBssid = "88:30:8A:6C:28:16";
- geofence_h geofenceH = NULL;
- const char *pSsid = "WI-FI";
- char *pszPlaceName = "SOME_PLACE";
- g_bGeofencemanagerCBFlag = false;
- g_bGeofencemanagerCBParameter = false;
-
- int nRet = geofence_manager_add_place(g_hGeofenceManager, pszPlaceName, &nPlaceId);
- PRINT_RESULT(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_manager_add_place", GeofenceManagerGetError(nRet));
- CHECK_VALUE_INT(nPlaceId, "geofence_manager_add_place");
-
- nRet = geofence_create_wifi(nPlaceId, pBssid, pSsid, &geofenceH);
- PRINT_RESULT_CLEANUP(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_create_wifi", GeofenceManagerGetError(nRet),geofence_manager_remove_place(g_hGeofenceManager, nPlaceId));
- CHECK_HANDLE(geofenceH, "geofence_create_wifi");
-
- nRet = geofence_manager_add_fence(g_hGeofenceManager, geofenceH, &nFenceId);
- PRINT_RESULT_CLEANUP(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_manager_add_fence", GeofenceManagerGetError(nRet), geofence_manager_unset_geofence_event_cb(g_hGeofenceManager);geofence_manager_remove_place(g_hGeofenceManager, nPlaceId));
- CHECK_VALUE_INT(nFenceId, "geofence_manager_add_fence");
-
- nRet = geofence_manager_foreach_geofence_list(g_hGeofenceManager, GeofenceManagerFenceCB, NULL);
- PRINT_RESULT(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_manager_foreach_geofence_list", GeofenceManagerGetError(nRet));
-
- RUN_POLLING_LOOP;
- if ( !g_bGeofencemanagerCBFlag )
- {
- FPRINTF("[Line : %d][%s] Callback failed [GeofenceManagerFenceCB]\\n", __LINE__, API_NAMESPACE);
- geofence_manager_remove_place(g_hGeofenceManager, nPlaceId);
- return 1;
- }
- else if ( !g_bGeofencemanagerCBParameter )
- {
- geofence_manager_remove_place(g_hGeofenceManager, nPlaceId);
- return 1;
- }
- nRet = geofence_manager_remove_fence(g_hGeofenceManager, nFenceId);
- PRINT_RESULT_CLEANUP(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_manager_remove_fence", GeofenceManagerGetError(nRet), geofence_manager_unset_geofence_event_cb(g_hGeofenceManager);geofence_manager_remove_place(g_hGeofenceManager, nPlaceId));
-
- nRet = geofence_destroy(geofenceH);
- PRINT_RESULT_CLEANUP(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_destroy", GeofenceManagerGetError(nRet), geofence_manager_remove_place(g_hGeofenceManager, nPlaceId));
-
- nRet = geofence_manager_remove_place(g_hGeofenceManager, nPlaceId);
- PRINT_RESULT_CLEANUP(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_manager_remove_place", GeofenceManagerGetError(nRet), geofence_manager_unset_geofence_event_cb(g_hGeofenceManager));
-
- return 0;
-}
-
-//& purpose: Call geofence callback to get geofence place list
-//& type: auto
-
-/**
- * @testcase ITc_geofence_manager_foreach_place_geofence_list_p
- * @since_tizen 2.4
- * @author SRID(gaurav.m2)
- * @reviewer SRID(gupta.sanjay)
- * @type auto
- * @description Call geofence callback to get geofence place list
- * @scenario Call geofence callback to get geofence place list
- * @apicovered geofence_manager_foreach_place_geofence_list, geofence_manager_add_place, geofence_manager_remove_place
- * @passcase When all covered API are successful
- * @failcase If target API fails or any precondition API fails
- * @precondition geofence_manager_create
- * @postcondition None
- */
-int ITc_geofence_manager_foreach_place_geofence_list_p(void)
-{
- START_TEST;
-
- int nTimeoutId;
- int nPlaceId = 0, nFenceId = 0;
- char *pBssid = "88:30:8A:6C:28:16";
- geofence_h geofenceH = NULL;
- const char *pSsid = "WI-FI";
- char *pszPlaceName = "SOME_PLACE";
- g_bGeofencemanagerCBFlag = false;
- g_bGeofencemanagerCBParameter = false;
-
- int nRet = geofence_manager_add_place(g_hGeofenceManager, pszPlaceName, &nPlaceId);
- PRINT_RESULT(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_manager_add_place", GeofenceManagerGetError(nRet));
- CHECK_VALUE_INT(nPlaceId, "geofence_manager_add_place");
-
- nRet = geofence_create_wifi(nPlaceId, pBssid, pSsid, &geofenceH);
- PRINT_RESULT_CLEANUP(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_create_wifi", GeofenceManagerGetError(nRet),geofence_manager_remove_place(g_hGeofenceManager, nPlaceId));
- CHECK_HANDLE(geofenceH, "geofence_create_wifi");
-
- nRet = geofence_manager_add_fence(g_hGeofenceManager, geofenceH, &nFenceId);
- PRINT_RESULT_CLEANUP(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_manager_add_fence", GeofenceManagerGetError(nRet), geofence_manager_unset_geofence_event_cb(g_hGeofenceManager);geofence_manager_remove_place(g_hGeofenceManager, nPlaceId));
- CHECK_VALUE_INT(nFenceId, "geofence_manager_add_fence");
-
- nRet = geofence_manager_foreach_place_geofence_list(g_hGeofenceManager, nPlaceId, GeofenceManagerFenceCB, NULL);
- PRINT_RESULT_CLEANUP(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_manager_foreach_place_geofence_list", GeofenceManagerGetError(nRet), geofence_manager_unset_geofence_event_cb(g_hGeofenceManager));
-
- RUN_POLLING_LOOP;
- if ( !g_bGeofencemanagerCBFlag )
- {
- FPRINTF("[Line : %d][%s] Callback failed [GeofenceManagerFenceCB]\\n", __LINE__, API_NAMESPACE);
- geofence_manager_remove_place(g_hGeofenceManager, nPlaceId);
- return 1;
- }
- else if ( !g_bGeofencemanagerCBParameter )
- {
- geofence_manager_remove_place(g_hGeofenceManager, nPlaceId);
- return 1;
- }
- nRet = geofence_manager_remove_fence(g_hGeofenceManager, nFenceId);
- PRINT_RESULT_CLEANUP(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_manager_remove_fence", GeofenceManagerGetError(nRet), geofence_manager_unset_geofence_event_cb(g_hGeofenceManager);geofence_manager_remove_place(g_hGeofenceManager, nPlaceId));
-
- nRet = geofence_destroy(geofenceH);
- PRINT_RESULT_CLEANUP(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_destroy", GeofenceManagerGetError(nRet), geofence_manager_remove_place(g_hGeofenceManager, nPlaceId));
-
- nRet = geofence_manager_remove_place(g_hGeofenceManager, nPlaceId);
- PRINT_RESULT_CLEANUP(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_manager_remove_place", GeofenceManagerGetError(nRet), geofence_manager_unset_geofence_event_cb(g_hGeofenceManager));
-
- return 0;
-}
-
-//& purpose: Call geofence callback to get place list
-//& type: auto
-
-/**
- * @testcase ITc_geofence_manager_foreach_place_list_p
- * @since_tizen 2.4
- * @author SRID(gaurav.m2)
- * @reviewer SRID(gupta.sanjay)
- * @type auto
- * @description Call geofence callback to get place list
- * @scenario Call geofence callback to get place list
- * @apicovered geofence_manager_foreach_place_list
- * @passcase When geofence_manager_foreach_place_list is successful
- * @failcase If target API fails or any precondition API fails
- * @precondition geofence_manager_create
- * @postcondition None
- */
-int ITc_geofence_manager_foreach_place_list_p(void)
-{
- START_TEST;
-
- int nTimeoutId;
- g_bGeofencemanagerCBFlag = false;
- g_bGeofencemanagerCBParameter = false;
-
- int nRet = geofence_manager_foreach_place_list(g_hGeofenceManager, GeofenceManagerPlaceCB, NULL);
- PRINT_RESULT(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_manager_foreach_place_list", GeofenceManagerGetError(nRet));
-
- RUN_POLLING_LOOP;
- if ( !g_bGeofencemanagerCBFlag )
- {
- FPRINTF("[Line : %d][%s] Callback failed [GeofenceManagerPlaceCB]\\n", __LINE__, API_NAMESPACE);
- return 1;
- }
- else if ( !g_bGeofencemanagerCBParameter )
- {
- return 1;
- }
-
- return 0;
-}
-
-//& purpose: Get place name
-//& type: auto
-
-/**
- * @testcase ITc_geofence_manager_get_place_name_p
- * @since_tizen 2.4
- * @author SRID(gaurav.m2)
- * @reviewer SRID(gupta.sanjay)
- * @type auto
- * @description Get place name
- * @scenario Get place name
- * @apicovered geofence_manager_add_place, geofence_manager_get_place_name, geofence_manager_remove_place
- * @passcase When geofence_manager_get_place_name, geofence_manager_add_place, geofence_manager_get_place_name is successful
- * @failcase If target API fails or any precondition API fails
- * @precondition geofence_manager_create
- * @postcondition None
- */
-int ITc_geofence_manager_get_place_name_p(void)
-{
- START_TEST;
-
- g_bGeofencemanagerCBFlag = false;
- char *pszPlaceName = NULL;
- char *pplacName = "SOME_PLACE";
- int nPlaceId = 0;
-
- int nRet = geofence_manager_add_place(g_hGeofenceManager, pplacName, &nPlaceId);
- PRINT_RESULT(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_manager_add_place", GeofenceManagerGetError(nRet));
- CHECK_VALUE_INT(nPlaceId, "geofence_manager_add_place");
-
- nRet = geofence_manager_get_place_name(g_hGeofenceManager, nPlaceId, &pszPlaceName);
- PRINT_RESULT_CLEANUP(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_manager_get_place_name", GeofenceManagerGetError(nRet), geofence_manager_remove_place(g_hGeofenceManager, nPlaceId));
- FPRINTF("[Line : %d][%s] pszPlaceName = %s\\n", __LINE__, API_NAMESPACE,pszPlaceName);
- if(pszPlaceName == NULL)
- {
- FPRINTF("[Line : %d][%s] output value is invalid\\n", __LINE__, API_NAMESPACE);
- geofence_manager_remove_place(g_hGeofenceManager, nPlaceId);
- return 1;
- }
-
- nRet = geofence_manager_remove_place(g_hGeofenceManager, nPlaceId);
- PRINT_RESULT(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_manager_remove_place", GeofenceManagerGetError(nRet));
-
- return 0;
-}
-
-/**
- * @testcase ITc_geofence_manager_set_unset_geofence_proximity_state_changed_cb_p
- * @since_tizen 3.0
- * @author SRID(nibha.sharma)
- * @reviewer SRID(parshant.v)
- * @type auto
- * @description Set and Unset proximity state
- * @scenario Set proximity state and Unset proximity state
- * @apicovered geofence_manager_set_geofence_proximity_state_changed_cb, geofence_manager_unset_geofence_proximity_state_changed_cb
- * @passcase When geofence_manager_set_geofence_proximity_state_changed_cb and geofence_manager_unset_geofence_proximity_state_changed_cb is successful
- * @failcase If target API fails or any precondition API fails
- * @precondition geofence_manager_create
- * @postcondition None
- */
-int ITc_geofence_manager_set_unset_geofence_proximity_state_changed_cb_p(void)
-{
- START_TEST;
-
- int nTimeoutId;
- g_bGeofencemanagerCBFlag = false;
- g_bGeofencemanagerCBParameter = false;
- int nPlaceId = 0, nFenceId = 0;
- char *pBssid = "88:30:8A:6C:28:16";
- geofence_h geofenceH = NULL;
- const char *pSsid = "WI-FI";
- char *pszPlaceName = "SOME_PLACE";
-
- int nRet = geofence_manager_add_place(g_hGeofenceManager, pszPlaceName, &nPlaceId);
- PRINT_RESULT(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_manager_add_place", GeofenceManagerGetError(nRet));
- CHECK_VALUE_INT(nPlaceId, "geofence_manager_add_place");
-
- nRet = geofence_create_wifi(nPlaceId, pBssid, pSsid, &geofenceH);
- PRINT_RESULT_CLEANUP(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_create_wifi", GeofenceManagerGetError(nRet),geofence_manager_remove_place(g_hGeofenceManager, nPlaceId));
- CHECK_HANDLE(geofenceH, "geofence_create_wifi");
-
- nRet = geofence_manager_add_fence(g_hGeofenceManager, geofenceH, &nFenceId);
- PRINT_RESULT_CLEANUP(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_manager_add_fence", GeofenceManagerGetError(nRet), geofence_manager_remove_fence(g_hGeofenceManager, nFenceId));
- CHECK_HANDLE(geofenceH, "geofence_manager_add_fence");
- CHECK_VALUE_INT(nFenceId, "geofence_manager_add_fence");
-
- nRet = geofence_manager_set_geofence_proximity_state_changed_cb(g_hGeofenceManager, GeofenceProximityStateChangedCB, "data");
- PRINT_RESULT(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_manager_set_geofence_proximity_state_changed_cb", GeofenceManagerGetError(nRet));
-
- nRet = geofence_manager_start(g_hGeofenceManager, nFenceId);
- PRINT_RESULT_CLEANUP(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_manager_start", GeofenceManagerGetError(nRet), geofence_manager_remove_place(g_hGeofenceManager, nPlaceId));
-
- RUN_POLLING_LOOP;
-
- if ( !g_bGeofencemanagerCBFlag )
- {
- FPRINTF("[Line : %d][%s] Callback failed [GeofenceProximityStateChangedCB]\\n", __LINE__, API_NAMESPACE);
- geofence_manager_unset_geofence_proximity_state_changed_cb(g_hGeofenceManager);
- return 1;
- }
- else if ( !g_bGeofencemanagerCBParameter )
- {
- geofence_manager_unset_geofence_proximity_state_changed_cb(g_hGeofenceManager);
- return 1;
- }
-
- nRet = geofence_manager_unset_geofence_proximity_state_changed_cb(g_hGeofenceManager);
- PRINT_RESULT(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_manager_unset_geofence_proximity_state_changed_cb", GeofenceManagerGetError(nRet));
-
- nRet = geofence_manager_stop(g_hGeofenceManager, nFenceId);
- PRINT_RESULT_CLEANUP(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_manager_stop", GeofenceManagerGetError(nRet), geofence_manager_remove_place(g_hGeofenceManager, nPlaceId));
-
- nRet = geofence_manager_remove_fence(g_hGeofenceManager, nFenceId);
- PRINT_RESULT_CLEANUP(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_manager_remove_fence", GeofenceManagerGetError(nRet), geofence_manager_remove_place(g_hGeofenceManager, nPlaceId));
-
- nRet = geofence_destroy(geofenceH);
- PRINT_RESULT_CLEANUP(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_destroy", GeofenceManagerGetError(nRet), geofence_manager_remove_place(g_hGeofenceManager, nPlaceId));
-
- nRet = geofence_manager_remove_place(g_hGeofenceManager, nPlaceId);
- PRINT_RESULT(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_manager_remove_place", GeofenceManagerGetError(nRet));
-
- return 0;
-}
-
-/** @} */ //end of itc-geofence-manager
-/** @} */ //end of itc-geofence-manager-testcases
+++ /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-geofence-manager-common.h"
-
-/**
- * @function ITs_geofence_startup
- * @description Called before each test
- * @parameter NA
- * @return NA
- */
-void ITs_geofence_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_Geofence_Manager_p\\n", __LINE__, API_NAMESPACE);
-#endif
-
- bool bFeatureSupported;
- g_bFeatureMismatch = g_bFeatureNotSupported = false;
- if ( !TCTCheckSystemInfoFeatureSupported(LOCATION_GEOFENCE_FEATURE, API_NAMESPACE) )
- {
- bFeatureSupported = false;
- }
- else
- {
- bFeatureSupported = true;
- }
-
- g_hGeofenceManager = NULL;
- int nRet = geofence_manager_create(&g_hGeofenceManager);
- FPRINTF("[Line : %d][%s] geofence_manager_create : return %d (%s)\\n", __LINE__, API_NAMESPACE, nRet, GeofenceManagerGetError(nRet));
- if( !bFeatureSupported )
- {
- if( nRet == GEOFENCE_MANAGER_ERROR_NOT_SUPPORTED )
- {
- g_bFeatureNotSupported = true;
- }
- else
- {
- g_bFeatureMismatch = true;
- }
- }
- else
- {
- if ( nRet != GEOFENCE_MANAGER_ERROR_NONE )
- {
- FPRINTF("[Line : %d][%s] geofence_manager_create failed in startup, error returned = %s\\n", __LINE__, API_NAMESPACE, GeofenceManagerGetError(nRet));
- g_bIsGeofenceCreated = false;
- }
- else if(g_hGeofenceManager == NULL)
- {
- FPRINTF("[Line : %d][%s] geofence_manager_create failed in startup, output handle is NULL\\n", __LINE__, API_NAMESPACE);
- g_bIsGeofenceCreated = false;
- }
- else
- {
- g_bIsGeofenceCreated = true;
- }
- }
-
- return;
-}
-
-/**
- * @function ITs_geofence_cleanup
- * @description Called after each test
- * @parameter NA
- * @return NA
- */
-void ITs_geofence_cleanup(void)
-{
-#if DEBUG
- FPRINTF("[Line : %d][%s] TEST SUIT clean-up: ITs_Geofence_Manager_p\\n", __LINE__, API_NAMESPACE);
-#endif
-
- if ( g_bIsGeofenceCreated )
- {
- int nRet = geofence_manager_destroy(g_hGeofenceManager);
- if ( nRet != GEOFENCE_MANAGER_ERROR_NONE )
- {
- FPRINTF("[Line : %d][%s] geofence_manager_destroy failed in cleanup, error returned = %s\\n", __LINE__, API_NAMESPACE, GeofenceManagerGetError(nRet));
- }
- }
-
- return;
-}
-
-/** @addtogroup itc-geofence-testcases
-* @brief Integration testcases for module geofence
-* @ingroup itc-geofence
-* @{
-*/
-
-
-//& purpose: get geofence type
-//& type: auto
-/**
- * @testcase ITc_geofence_get_type_p
- * @since_tizen 2.4
- * @author SRID(gaurav.m2)
- * @reviewer SRID(gupta.sanjay)
- * @type auto
- * @description get geofence type
- * @scenario get geofence type
- * @apicovered geofence_manager_add_place, geofence_create_bluetooth, geofence_manager_add_fence, geofence_get_type, geofence_manager_remove_fence, geofence_destroy, geofence_manager_remove_place
- * @passcase When geofence_manager_add_place, geofence_create_bluetooth, geofence_manager_add_fence, geofence_get_type is successful
- * @failcase If target API fails or any precondition API fails
- * @precondition geofence_manager_create
- * @postcondition None
- */
-int ITc_geofence_get_type_p(void)
-{
- START_TEST;
-
- int nPlaceId = 0, nFenceId = 0;
- char *pBssid = "88:30:8A:6C:28:16";
- geofence_h geofenceH = NULL;
- const char *pSsid = "BT";
- char *pszPlaceName = "SOME_PLACE";
- geofence_type_e type;
-
- int nRet = geofence_manager_add_place(g_hGeofenceManager, pszPlaceName, &nPlaceId);
- PRINT_RESULT(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_manager_add_place", GeofenceManagerGetError(nRet));
- CHECK_VALUE_INT(nPlaceId, "geofence_manager_add_place");
-
- nRet = geofence_create_bluetooth(nPlaceId, pBssid, pSsid, &geofenceH);
- PRINT_RESULT_CLEANUP(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_create_bluetooth", GeofenceManagerGetError(nRet), geofence_manager_remove_place(g_hGeofenceManager, nPlaceId));
- CHECK_HANDLE(geofenceH, "geofence_create_bluetooth");
-
- nRet = geofence_manager_add_fence(g_hGeofenceManager, geofenceH, &nFenceId);
- PRINT_RESULT_CLEANUP(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_manager_add_fence", GeofenceManagerGetError(nRet), geofence_manager_remove_fence(g_hGeofenceManager, nFenceId));
- CHECK_HANDLE(geofenceH, "geofence_manager_add_fence");
- CHECK_VALUE_INT(nFenceId, "geofence_manager_add_fence");
-
- nRet = geofence_get_type(geofenceH, &type);
- PRINT_RESULT_CLEANUP(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_get_type", GeofenceManagerGetError(nRet), geofence_manager_remove_place(g_hGeofenceManager, nPlaceId));
- if (type != GEOFENCE_TYPE_BT)
- {
- FPRINTF("[Line : %d][%s] type is invalid\\n", __LINE__, API_NAMESPACE);
- return 1;
- }
-
- nRet = geofence_manager_remove_fence(g_hGeofenceManager, nFenceId);
- PRINT_RESULT_CLEANUP(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_manager_remove_fence", GeofenceManagerGetError(nRet), geofence_manager_remove_place(g_hGeofenceManager, nPlaceId));
-
- nRet = geofence_destroy(geofenceH);
- PRINT_RESULT_CLEANUP(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_destroy", GeofenceManagerGetError(nRet), geofence_manager_remove_place(g_hGeofenceManager, nPlaceId));
-
- nRet = geofence_manager_remove_place(g_hGeofenceManager, nPlaceId);
- PRINT_RESULT(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_manager_remove_place", GeofenceManagerGetError(nRet));
-
- return 0;
-}
-
-//& purpose: get geofence place id
-//& type: auto
-/**
- * @testcase ITc_geofence_get_place_id_p
- * @since_tizen 2.4
- * @author SRID(gaurav.m2)
- * @reviewer SRID(gupta.sanjay)
- * @type auto
- * @description get geofence place id
- * @scenario get geofence place id
- * @apicovered geofence_manager_add_place, geofence_create_bluetooth, geofence_manager_add_fence, geofence_get_place_id, geofence_manager_remove_fence, geofence_destroy, geofence_manager_remove_place
- * @passcase When geofence_manager_add_place, geofence_create_bluetooth, geofence_manager_add_fence, geofence_get_place_id is successful
- * @failcase If target API fails or any precondition API fails
- * @precondition geofence_manager_create
- * @postcondition None
- */
-int ITc_geofence_get_place_id_p(void)
-{
- START_TEST;
-
- int nPlaceId = 0, nFenceId = 0;
- char *pBssid = "88:30:8A:6C:28:16";
- geofence_h geofenceH = NULL;
- const char *pSsid = "BT";
- char *pszPlaceName = "SOME_PLACE";
-
- int nRet = geofence_manager_add_place(g_hGeofenceManager, pszPlaceName, &nPlaceId);
- PRINT_RESULT(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_manager_add_place", GeofenceManagerGetError(nRet));
- CHECK_VALUE_INT(nPlaceId, "geofence_manager_add_place");
-
- nRet = geofence_create_bluetooth(nPlaceId, pBssid, pSsid, &geofenceH);
- PRINT_RESULT_CLEANUP(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_create_bluetooth", GeofenceManagerGetError(nRet), geofence_manager_remove_place(g_hGeofenceManager, nPlaceId));
- CHECK_HANDLE(geofenceH, "geofence_create_bluetooth");
-
- nRet = geofence_manager_add_fence(g_hGeofenceManager, geofenceH, &nFenceId);
- PRINT_RESULT_CLEANUP(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_manager_add_fence", GeofenceManagerGetError(nRet), geofence_manager_remove_fence(g_hGeofenceManager, nFenceId));
- CHECK_HANDLE(geofenceH, "geofence_manager_add_fence");
- CHECK_VALUE_INT(nFenceId, "geofence_manager_add_fence");
-
- nRet = geofence_get_place_id(geofenceH, &nPlaceId);
- PRINT_RESULT_CLEANUP(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_get_place_id", GeofenceManagerGetError(nRet), geofence_manager_remove_place(g_hGeofenceManager, nPlaceId));
- CHECK_VALUE_INT(nPlaceId, "geofence_get_place_id");
-
- nRet = geofence_manager_remove_fence(g_hGeofenceManager, nFenceId);
- PRINT_RESULT_CLEANUP(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_manager_remove_fence", GeofenceManagerGetError(nRet), geofence_manager_remove_place(g_hGeofenceManager, nPlaceId));
-
- nRet = geofence_destroy(geofenceH);
- PRINT_RESULT_CLEANUP(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_destroy", GeofenceManagerGetError(nRet), geofence_manager_remove_place(g_hGeofenceManager, nPlaceId));
-
- nRet = geofence_manager_remove_place(g_hGeofenceManager, nPlaceId);
- PRINT_RESULT(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_manager_remove_place", GeofenceManagerGetError(nRet));
-
- return 0;
-}
-
-//& purpose: get geofence latitude
-//& type: auto
-/**
- * @testcase ITc_geofence_get_latitude_p
- * @since_tizen 2.4
- * @author SRID(gaurav.m2)
- * @reviewer SRID(gupta.sanjay)
- * @type auto
- * @description get geofence latitude
- * @scenario get geofence latitude
- * @apicovered geofence_manager_add_place, geofence_create_geopoint, geofence_get_latitude, geofence_destroy, geofence_manager_remove_place
- * @passcase When geofence_manager_add_place, geofence_create_geopoint, geofence_get_latitude is successful
- * @failcase If target API fails or any precondition API fails
- * @precondition geofence_manager_create
- * @postcondition None
- */
-int ITc_geofence_get_latitude_p(void)
-{
- START_TEST;
-
- int nPlaceId = 0;
- geofence_h geofenceH = NULL;
- char *pszAddress = "SOME_PLACE";
- char *pszPlaceName = "SOME_PLACE";
- double dLatitude = 1.2345, dLongitude = 2.3456;
- int nRadius = 100;
-
- int nRet = geofence_manager_add_place(g_hGeofenceManager, pszPlaceName, &nPlaceId);
- PRINT_RESULT(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_manager_add_place", GeofenceManagerGetError(nRet));
- CHECK_VALUE_INT(nPlaceId, "geofence_manager_add_place");
-
- nRet = geofence_create_geopoint(nPlaceId, dLatitude, dLongitude, nRadius, pszAddress, &geofenceH);
- PRINT_RESULT_CLEANUP(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_create_geopoint", GeofenceManagerGetError(nRet), geofence_manager_remove_place(g_hGeofenceManager, nPlaceId));
- CHECK_HANDLE(geofenceH, "geofence_create_geopoint");
-
- nRet = geofence_get_latitude(geofenceH, &dLatitude);
- PRINT_RESULT_CLEANUP(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_get_latitude", GeofenceManagerGetError(nRet), geofence_manager_remove_place(g_hGeofenceManager, nPlaceId));
- if(dLatitude == 0.0)
- {
- FPRINTF("[Line : %d][%s] Latitude is invalid\\n", __LINE__, API_NAMESPACE);
- return 1;
- }
-
- nRet = geofence_destroy(geofenceH);
- PRINT_RESULT_CLEANUP(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_destroy", GeofenceManagerGetError(nRet), geofence_manager_remove_place(g_hGeofenceManager, nPlaceId));
-
- nRet = geofence_manager_remove_place(g_hGeofenceManager, nPlaceId);
- PRINT_RESULT(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_manager_remove_place", GeofenceManagerGetError(nRet));
-
- return 0;
-}
-
-//& purpose: get geofence longitude
-//& type: auto
-/**
- * @testcase ITc_geofence_get_longitude_p
- * @since_tizen 2.4
- * @author SRID(gaurav.m2)
- * @reviewer SRID(gupta.sanjay)
- * @type auto
- * @description get geofence longitude
- * @scenario get geofence longitude
- * @apicovered geofence_manager_add_place, geofence_create_geopoint, geofence_get_longitude, geofence_destroy, geofence_manager_remove_place
- * @passcase When geofence_manager_add_place, geofence_create_geopoint, geofence_get_longitude is successful
- * @failcase If target API fails or any precondition API fails
- * @precondition geofence_manager_create
- * @postcondition None
- */
-int ITc_geofence_get_longitude_p(void)
-{
- START_TEST;
-
- int nPlaceId = 0;
- geofence_h geofenceH = NULL;
- char *pszAddress = "SOME_PLACE";
- char *pszPlaceName = "SOME_PLACE";
- double dLatitude = 1.2345, dLongitude = 2.3456;
- int nRadius = 100;
-
- int nRet = geofence_manager_add_place(g_hGeofenceManager, pszPlaceName, &nPlaceId);
- PRINT_RESULT(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_manager_add_place", GeofenceManagerGetError(nRet));
- CHECK_VALUE_INT(nPlaceId, "geofence_manager_add_place");
-
- nRet = geofence_create_geopoint(nPlaceId, dLatitude, dLongitude, nRadius, pszAddress, &geofenceH);
- PRINT_RESULT_CLEANUP(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_create_geopoint", GeofenceManagerGetError(nRet), geofence_manager_remove_place(g_hGeofenceManager, nPlaceId));
- CHECK_HANDLE(geofenceH, "geofence_create_geopoint");
-
- nRet = geofence_get_longitude(geofenceH, &dLongitude);
- PRINT_RESULT_CLEANUP(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_get_longitude", GeofenceManagerGetError(nRet), geofence_manager_remove_place(g_hGeofenceManager, nPlaceId));
- if(dLongitude == 0.0)
- {
- FPRINTF("[Line : %d][%s] Longitude is invalid\\n", __LINE__, API_NAMESPACE);
- return 1;
- }
-
- nRet = geofence_destroy(geofenceH);
- PRINT_RESULT_CLEANUP(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_destroy", GeofenceManagerGetError(nRet), geofence_manager_remove_place(g_hGeofenceManager, nPlaceId));
-
- nRet = geofence_manager_remove_place(g_hGeofenceManager, nPlaceId);
- PRINT_RESULT(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_manager_remove_place", GeofenceManagerGetError(nRet));
-
- return 0;
-}
-
-//& purpose: get geofence radius
-//& type: auto
-/**
- * @testcase ITc_geofence_get_radius_p
- * @since_tizen 2.4
- * @author SRID(gaurav.m2)
- * @reviewer SRID(gupta.sanjay)
- * @type auto
- * @description get geofence radius
- * @scenario get geofence radius
- * @apicovered geofence_manager_add_place, geofence_create_geopoint, geofence_get_radius, geofence_destroy, geofence_manager_remove_place
- * @passcase When geofence_manager_add_place, geofence_create_geopoint, geofence_get_radius is successful
- * @failcase If target API fails or any precondition API fails
- * @precondition geofence_manager_create
- * @postcondition None
- */
-int ITc_geofence_get_radius_p(void)
-{
- START_TEST;
-
- int nPlaceId = 0;
- geofence_h geofenceH = NULL;
- char *pszAddress = "SOME_PLACE";
- char *pszPlaceName = "SOME_PLACE";
- double dLatitude = 1.2345, dLongitude = 2.3456;
- int nRadius = 100;
-
- int nRet = geofence_manager_add_place(g_hGeofenceManager, pszPlaceName, &nPlaceId);
- PRINT_RESULT(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_manager_add_place", GeofenceManagerGetError(nRet));
- CHECK_VALUE_INT(nPlaceId, "geofence_manager_add_place");
-
- nRet = geofence_create_geopoint(nPlaceId, dLatitude, dLongitude, nRadius, pszAddress, &geofenceH);
- PRINT_RESULT_CLEANUP(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_create_geopoint", GeofenceManagerGetError(nRet), geofence_manager_remove_place(g_hGeofenceManager, nPlaceId));
- CHECK_HANDLE(geofenceH, "geofence_create_geopoint");
-
- nRet = geofence_get_radius(geofenceH, &nRadius);
- PRINT_RESULT_CLEANUP(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_get_radius", GeofenceManagerGetError(nRet), geofence_manager_remove_place(g_hGeofenceManager, nPlaceId));
- CHECK_VALUE_INT(nRadius, "geofence_get_radius");
-
- nRet = geofence_destroy(geofenceH);
- PRINT_RESULT_CLEANUP(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_destroy", GeofenceManagerGetError(nRet), geofence_manager_remove_place(g_hGeofenceManager, nPlaceId));
-
- nRet = geofence_manager_remove_place(g_hGeofenceManager, nPlaceId);
- PRINT_RESULT(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_manager_remove_place", GeofenceManagerGetError(nRet));
-
- return 0;
-}
-
-//& purpose: get geofence bssid
-//& type: auto
-/**
- * @testcase ITc_geofence_get_bssid_p
- * @since_tizen 2.4
- * @author SRID(gaurav.m2)
- * @reviewer SRID(gupta.sanjay)
- * @type auto
- * @description get geofence bssid
- * @scenario get geofence bssid
- * @apicovered geofence_manager_add_place, geofence_create_bluetooth, geofence_get_bssid, geofence_destroy, geofence_manager_remove_place
- * @passcase When geofence_manager_add_place, geofence_create_bluetooth, geofence_get_bssid is successful
- * @failcase If target API or any precondition API fails
- * @precondition geofence_manager_create
- * @postcondition None
- */
-int ITc_geofence_get_bssid_p(void)
-{
- START_TEST;
-
- geofence_h geofenceH = NULL;
- char *pszBSSID = "88:30:8A:6C:28:16";
- char *pszSSID = "BT";
- char *pszPlaceName = "SOME_PLACE";
- char *pszGetBSSID = NULL;
- int nPlaceId = 0;
-
- int nRet = geofence_manager_add_place(g_hGeofenceManager, pszPlaceName, &nPlaceId);
- PRINT_RESULT(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_manager_add_place", GeofenceManagerGetError(nRet));
- CHECK_VALUE_INT(nPlaceId, "geofence_manager_add_place");
-
- nRet = geofence_create_bluetooth(nPlaceId, pszBSSID, pszSSID, &geofenceH);
- PRINT_RESULT_CLEANUP(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_create_bluetooth", GeofenceManagerGetError(nRet), geofence_manager_remove_place(g_hGeofenceManager, nPlaceId));
- CHECK_HANDLE(geofenceH, "geofence_create_bluetooth");
-
- nRet = geofence_get_bssid(geofenceH, &pszGetBSSID);
- PRINT_RESULT_CLEANUP(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_get_bssid", GeofenceManagerGetError(nRet), geofence_manager_remove_place(g_hGeofenceManager, nPlaceId));
- CHECK_VALUE_STRING(pszGetBSSID, "geofence_get_bssid");
-
- nRet = geofence_destroy(geofenceH);
- PRINT_RESULT_CLEANUP(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_destroy", GeofenceManagerGetError(nRet), geofence_manager_remove_place(g_hGeofenceManager, nPlaceId));
-
- nRet = geofence_manager_remove_place(g_hGeofenceManager, nPlaceId);
- PRINT_RESULT(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_manager_remove_place", GeofenceManagerGetError(nRet));
-
- return 0;
-}
-
-//& purpose: get geofence ssid
-//& type: auto
-/**
- * @testcase ITc_geofence_get_ssid_p
- * @since_tizen 2.4
- * @author SRID(gaurav.m2)
- * @reviewer SRID(gupta.sanjay)
- * @type auto
- * @description get geofence ssid
- * @scenario get geofence ssid
- * @apicovered geofence_manager_add_place, geofence_create_bluetooth, geofence_get_ssid, geofence_destroy, geofence_manager_remove_place
- * @passcase When geofence_manager_add_place, geofence_create_bluetooth, geofence_get_ssid is successful
- * @failcase If target API any precondition API fails
- * @precondition geofence_manager_create
- * @postcondition None
- */
-int ITc_geofence_get_ssid_p(void)
-{
- START_TEST;
-
- geofence_h geofenceH = NULL;
- char *pszBSSID = "88:30:8A:6C:28:16";
- char *pszSSID = "BT";
- char *pszPlaceName = "SOME_PLACE";
- char *pszGetSSID = NULL;
- int nPlaceId = 0;
-
- int nRet = geofence_manager_add_place(g_hGeofenceManager, pszPlaceName, &nPlaceId);
- PRINT_RESULT(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_manager_add_place", GeofenceManagerGetError(nRet));
- CHECK_VALUE_INT(nPlaceId, "geofence_manager_add_place");
-
- nRet = geofence_create_bluetooth(nPlaceId, pszBSSID, pszSSID, &geofenceH);
- PRINT_RESULT_CLEANUP(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_create_bluetooth", GeofenceManagerGetError(nRet), geofence_manager_remove_place(g_hGeofenceManager, nPlaceId));
- CHECK_HANDLE(geofenceH, "geofence_create_bluetooth");
-
- nRet = geofence_get_ssid(geofenceH, &pszGetSSID);
- PRINT_RESULT_CLEANUP(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_get_ssid", GeofenceManagerGetError(nRet), geofence_manager_remove_place(g_hGeofenceManager, nPlaceId));
- CHECK_VALUE_STRING(pszGetSSID, "geofence_get_ssid");
-
- nRet = geofence_destroy(geofenceH);
- PRINT_RESULT_CLEANUP(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_destroy", GeofenceManagerGetError(nRet), geofence_manager_remove_place(g_hGeofenceManager, nPlaceId));
-
- nRet = geofence_manager_remove_place(g_hGeofenceManager, nPlaceId);
- PRINT_RESULT(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_manager_remove_place", GeofenceManagerGetError(nRet));
-
- return 0;
-}
-
-
-//& purpose: get geofence address
-//& type: auto
-/**
- * @testcase ITc_geofence_get_address_p
- * @since_tizen 2.4
- * @author SRID(gaurav.m2)
- * @reviewer SRID(gupta.sanjay)
- * @type auto
- * @description get geofence address
- * @scenario get geofence address
- * @apicovered geofence_manager_add_place, geofence_create_geopoint, geofence_get_address, geofence_destroy, geofence_manager_remove_place
- * @passcase When geofence_manager_add_place, geofence_create_geopoint, geofence_get_address is successful
- * @failcase If target API or any precondition API fails
- * @precondition geofence_manager_create
- * @postcondition None
- */
-int ITc_geofence_get_address_p(void)
-{
- START_TEST;
-
- geofence_h geofenceH = NULL;
- char *pszAddress = "SOME_PLACE";
- char *pszPlaceName = "SOME_PLACE";
- char *pszGetAddress = NULL;
- int nPlaceId = 0;
- double dLatitude = 1.2345, dLongitude = 2.3456;
- int nRadius = 100;
-
- int nRet = geofence_manager_add_place(g_hGeofenceManager, pszPlaceName, &nPlaceId);
- PRINT_RESULT(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_manager_add_place", GeofenceManagerGetError(nRet));
- CHECK_VALUE_INT(nPlaceId, "geofence_manager_add_place");
-
- nRet = geofence_create_geopoint(nPlaceId, dLatitude, dLongitude, nRadius, pszAddress, &geofenceH);
- PRINT_RESULT_CLEANUP(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_create_geopoint", GeofenceManagerGetError(nRet), geofence_manager_remove_place(g_hGeofenceManager, nPlaceId));
- CHECK_HANDLE(geofenceH, "geofence_create_geopoint");
-
- nRet = geofence_get_address(geofenceH, &pszGetAddress);
- PRINT_RESULT_CLEANUP(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_get_address", GeofenceManagerGetError(nRet), geofence_manager_remove_place(g_hGeofenceManager, nPlaceId));
- CHECK_VALUE_STRING(pszGetAddress, "geofence_get_address");
-
- nRet = geofence_destroy(geofenceH);
- PRINT_RESULT_CLEANUP(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_destroy", GeofenceManagerGetError(nRet), geofence_manager_remove_place(g_hGeofenceManager, nPlaceId));
-
- nRet = geofence_manager_remove_place(g_hGeofenceManager, nPlaceId);
- PRINT_RESULT(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_manager_remove_place", GeofenceManagerGetError(nRet));
-
- return 0;
-}
-
-//& purpose: create geopoint
-//& type: auto
-/**
- * @testcase ITc_geofence_create_geopoint_desroy_p
- * @since_tizen 2.4
- * @author SRID(gaurav.m2)
- * @reviewer SRID(gupta.sanjay)
- * @type auto
- * @description create geopoint
- * @scenario geofence_get_place_id\n
- * geofence_get_latitude\n
- * geofence_get_longitude\n
- * geofence_get_radius\n
- * create geopoint
- * @apicovered geofence_manager_add_place, geofence_create_geopoint, geofence_destroy, geofence_manager_remove_place
- * @passcase When geofence_manager_add_place, geofence_create_geopoint, geofence_destroy is successful
- * @failcase If target API fails or any precondition API fails
- * @precondition geofence_manager_create
- * @postcondition None
- */
-int ITc_geofence_create_geopoint_desroy_p(void)
-{
- START_TEST;
-
- int nPlaceId = 0, nRadius = 100;
- double dLatitude = 1.2345, dLongitude = 2.3456;
- geofence_h geofenceH = NULL;
- const char *pAddress = "SOME_PLACE";
- char *pszPlaceName = "SOME_PLACE";
-
- int nRet = geofence_manager_add_place(g_hGeofenceManager, pszPlaceName, &nPlaceId);
- PRINT_RESULT(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_manager_add_place", GeofenceManagerGetError(nRet));
- CHECK_VALUE_INT(nPlaceId, "geofence_manager_add_place");
-
- nRet = geofence_create_geopoint(nPlaceId, dLatitude, dLongitude, nRadius, pAddress, &geofenceH);
- PRINT_RESULT_CLEANUP(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_create_geopoint", GeofenceManagerGetError(nRet), geofence_manager_remove_place(g_hGeofenceManager, nPlaceId));
- CHECK_HANDLE(geofenceH, "geofence_create_geopoint");
-
- nRet = geofence_destroy(geofenceH);
- PRINT_RESULT_CLEANUP(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_destroy", GeofenceManagerGetError(nRet), geofence_manager_remove_place(g_hGeofenceManager, nPlaceId));
-
- nRet = geofence_manager_remove_place(g_hGeofenceManager, nPlaceId);
- PRINT_RESULT(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_manager_remove_place", GeofenceManagerGetError(nRet));
-
- return 0;
-}
-
-//& purpose: create bluetooth geopoint
-//& type: auto
-/**
- * @testcase ITc_geofence_create_bluetooth_destroy_p
- * @since_tizen 2.4
- * @author SRID(gaurav.m2)
- * @reviewer SRID(gupta.sanjay)
- * @type auto
- * @description create bluetooth geopoint
- * @scenario geofence_get_place_id\n
- * get geofence bssid\n
- * create bluetooth geopoint
- * @apicovered geofence_manager_add_place, geofence_create_bluetooth, geofence_destroy, geofence_manager_remove_place
- * @passcase When geofence_manager_add_place, geofence_create_bluetooth, geofence_destroy is successful
- * @failcase If target API fails or any precondition API fails
- * @precondition geofence_manager_create
- * @postcondition None
- */
-int ITc_geofence_create_bluetooth_destroy_p(void)
-{
- START_TEST;
-
- int nPlaceId = 0;
- char *pBssid = "88:30:8A:6C:28:16";
- geofence_h geofenceH = NULL;
- const char *pSsid = "BT";
- char *pszPlaceName = "SOME_PLACE";
-
- int nRet = geofence_manager_add_place(g_hGeofenceManager, pszPlaceName, &nPlaceId);
- PRINT_RESULT(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_manager_add_place", GeofenceManagerGetError(nRet));
- CHECK_VALUE_INT(nPlaceId, "geofence_manager_add_place");
-
- nRet = geofence_create_bluetooth(nPlaceId, pBssid, pSsid, &geofenceH);
- PRINT_RESULT_CLEANUP(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_create_bluetooth", GeofenceManagerGetError(nRet), geofence_manager_remove_place(g_hGeofenceManager, nPlaceId));
- CHECK_HANDLE(geofenceH, "geofence_create_bluetooth");
-
- nRet = geofence_destroy(geofenceH);
- PRINT_RESULT_CLEANUP(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_destroy", GeofenceManagerGetError(nRet), geofence_manager_remove_place(g_hGeofenceManager, nPlaceId));
-
- nRet = geofence_manager_remove_place(g_hGeofenceManager, nPlaceId);
- PRINT_RESULT(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_manager_remove_place", GeofenceManagerGetError(nRet));
-
- return 0;
-}
-
-//& purpose: create bluetooth wifi
-//& type: auto
-/**
- * @testcase ITc_geofence_create_wifi_destroy_p
- * @since_tizen 2.4
- * @author SRID(gaurav.m2)
- * @reviewer SRID(gupta.sanjay)
- * @type auto
- * @description create wifi
- * @scenario geofence_get_place_id\n
- * get geofence bssid\n
- * create bluetooth wifi
- * @apicovered geofence_manager_add_place, geofence_create_wifi, geofence_destroy, geofence_manager_remove_place
- * @passcase When geofence_manager_add_place, geofence_create_wifi, geofence_destroy is successful
- * @failcase If target API fails or any precondition API fails
- * @precondition geofence_manager_create
- * @postcondition None
- */
-int ITc_geofence_create_wifi_destroy_p(void)
-{
- START_TEST;
-
- int nPlaceId = 0;
- char *pBssid = "88:30:8A:6C:28:16";
- geofence_h geofenceH = NULL;
- const char *pSsid = "WI-FI";
- char *pszPlaceName = "SOME_PLACE";
-
- int nRet = geofence_manager_add_place(g_hGeofenceManager, pszPlaceName, &nPlaceId);
- PRINT_RESULT(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_manager_add_place", GeofenceManagerGetError(nRet));
- CHECK_VALUE_INT(nPlaceId, "geofence_manager_add_place");
-
- nRet = geofence_create_wifi(nPlaceId, pBssid, pSsid, &geofenceH);
- PRINT_RESULT_CLEANUP(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_create_wifi", GeofenceManagerGetError(nRet),geofence_manager_remove_place(g_hGeofenceManager, nPlaceId));
- CHECK_HANDLE(geofenceH, "geofence_create_wifi");
-
- nRet = geofence_destroy(geofenceH);
- PRINT_RESULT_CLEANUP(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_destroy", GeofenceManagerGetError(nRet), geofence_manager_remove_place(g_hGeofenceManager, nPlaceId));
-
- nRet = geofence_manager_remove_place(g_hGeofenceManager, nPlaceId);
- PRINT_RESULT(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_manager_remove_place", GeofenceManagerGetError(nRet));
-
- return 0;
-}
-
-//& purpose: create/destroy geofence status
-//& type: auto
-/**
- * @testcase ITc_geofence_status_create_destroy_p
- * @since_tizen 2.4
- * @author SRID(gaurav.m2)
- * @reviewer SRID(gupta.sanjay)
- * @type auto
- * @description create/destroy geofence status
- * @scenario Set unset geofence event callback\n
- * create/destroy geofence status
- * @apicovered geofence_manager_add_place, geofence_create_wifi, geofence_manager_add_fence, geofence_status_create, geofence_status_destroy, geofence_destroy, geofence_manager_remove_fence, geofence_manager_remove_place
- * @passcase When geofence_manager_add_place, geofence_create_wifi, geofence_manager_add_fence, geofence_status_create, geofence_status_destroy is successful
- * @failcase If target API fails or any precondition API fails
- * @precondition geofence_manager_create
- * @postcondition None
- */
-int ITc_geofence_status_create_destroy_p(void)
-{
- START_TEST;
-
- int nPlaceId = 0, nFenceId = 0;
- char *pBssid = "88:30:8A:6C:28:16";
- geofence_h geofenceH = NULL;
- const char *pSsid = "WI-FI";
- char *pszPlaceName = "SOME_PLACE";
- geofence_status_h geofenceStatusH = NULL;
-
- int nRet = geofence_manager_add_place(g_hGeofenceManager, pszPlaceName, &nPlaceId);
- PRINT_RESULT(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_manager_add_place", GeofenceManagerGetError(nRet));
- CHECK_VALUE_INT(nPlaceId, "geofence_manager_add_place");
-
- nRet = geofence_create_wifi(nPlaceId, pBssid, pSsid, &geofenceH);
- PRINT_RESULT_CLEANUP(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_create_wifi", GeofenceManagerGetError(nRet),geofence_manager_remove_place(g_hGeofenceManager, nPlaceId));
- CHECK_HANDLE(geofenceH, "geofence_create_wifi");
-
- nRet = geofence_manager_add_fence(g_hGeofenceManager, geofenceH, &nFenceId);
- PRINT_RESULT_CLEANUP(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_manager_add_fence", GeofenceManagerGetError(nRet), geofence_manager_remove_fence(g_hGeofenceManager, nFenceId));
- CHECK_HANDLE(geofenceH, "geofence_manager_add_fence");
- CHECK_VALUE_INT(nFenceId, "geofence_manager_add_fence");
-
- nRet = geofence_status_create(nFenceId, &geofenceStatusH);
- PRINT_RESULT_CLEANUP(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_status_create", GeofenceManagerGetError(nRet), geofence_manager_remove_place(g_hGeofenceManager, nPlaceId);geofence_manager_unset_geofence_event_cb(g_hGeofenceManager));
- CHECK_HANDLE(geofenceStatusH, "geofence_status_create");
-
- nRet = geofence_status_destroy(geofenceStatusH);
- PRINT_RESULT_CLEANUP(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_status_destroy", GeofenceManagerGetError(nRet), geofence_manager_remove_place(g_hGeofenceManager, nPlaceId);geofence_manager_unset_geofence_event_cb(g_hGeofenceManager));
-
- nRet = geofence_manager_remove_fence(g_hGeofenceManager, nFenceId);
- PRINT_RESULT_CLEANUP(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_manager_remove_fence", GeofenceManagerGetError(nRet), geofence_manager_remove_place(g_hGeofenceManager, nPlaceId));
-
- nRet = geofence_destroy(geofenceH);
- PRINT_RESULT_CLEANUP(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_destroy", GeofenceManagerGetError(nRet), geofence_manager_remove_place(g_hGeofenceManager, nPlaceId));
-
- nRet = geofence_manager_remove_place(g_hGeofenceManager, nPlaceId);
- PRINT_RESULT(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_manager_remove_place", GeofenceManagerGetError(nRet));
-
- return 0;
-}
-
-//& purpose: geofence status get state
-//& type: auto
-/**
- * @testcase ITc_geofence_status_get_state_p
- * @since_tizen 2.4
- * @author SRID(gaurav.m2)
- * @reviewer SRID(gupta.sanjay)
- * @type auto
- * @description geofence status get state
- * @scenario Set unset geofence event callback\n
- * create/destroy geofence status\n
- * geofence status get state
- * @apicovered geofence_manager_add_place, geofence_create_wifi, geofence_manager_add_fence, geofence_status_create, geofence_status_get_state, geofence_status_destroy, geofence_manager_remove_fence, geofence_destroy, geofence_manager_remove_place
- * @passcase When geofence_manager_add_place, geofence_create_wifi, geofence_manager_add_fence, geofence_status_create, geofence_status_get_state is successful
- * @failcase If target API fails or any precondition API fails
- * @precondition geofence_manager_create
- * @postcondition None
- */
-int ITc_geofence_status_get_state_p(void)
-{
- START_TEST;
-
- int nPlaceId = 0, nFenceId = 0;
- char *pBssid = "88:30:8A:6C:28:16";
- geofence_h geofenceH = NULL;
- const char *pSsid = "WI-FI";
- char *pszPlaceName = "SOME_PLACE";
- geofence_status_h geofenceStatusH = NULL;
- geofence_state_e eGeofenceState = -1;
-
- int nRet = geofence_manager_add_place(g_hGeofenceManager, pszPlaceName, &nPlaceId);
- PRINT_RESULT(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_manager_add_place", GeofenceManagerGetError(nRet));
- CHECK_VALUE_INT(nPlaceId, "geofence_manager_add_place");
-
- nRet = geofence_create_wifi(nPlaceId, pBssid, pSsid, &geofenceH);
- PRINT_RESULT_CLEANUP(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_create_wifi", GeofenceManagerGetError(nRet),geofence_manager_remove_place(g_hGeofenceManager, nPlaceId));
- CHECK_HANDLE(geofenceH, "geofence_create_wifi");
-
- nRet = geofence_manager_add_fence(g_hGeofenceManager, geofenceH, &nFenceId);
- PRINT_RESULT_CLEANUP(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_manager_add_fence", GeofenceManagerGetError(nRet), geofence_manager_remove_fence(g_hGeofenceManager, nFenceId));
- CHECK_HANDLE(geofenceH, "geofence_manager_add_fence");
- CHECK_VALUE_INT(nFenceId, "geofence_manager_add_fence");
-
- nRet = geofence_status_create(nFenceId, &geofenceStatusH);
- PRINT_RESULT_CLEANUP(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_status_create", GeofenceManagerGetError(nRet), geofence_manager_remove_place(g_hGeofenceManager, nPlaceId);geofence_manager_unset_geofence_event_cb(g_hGeofenceManager));
- CHECK_HANDLE(geofenceStatusH, "geofence_status_create");
-
- nRet = geofence_status_get_state(geofenceStatusH, &eGeofenceState);
- PRINT_RESULT_CLEANUP(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_status_get_state", GeofenceManagerGetError(nRet), geofence_manager_remove_place(g_hGeofenceManager, nPlaceId);geofence_manager_unset_geofence_event_cb(g_hGeofenceManager));
- if((eGeofenceState<0) || (eGeofenceState>2))
- {
- FPRINTF("[Line : %d][%s] state is not valid\\n", __LINE__, API_NAMESPACE);
- geofence_manager_remove_fence(g_hGeofenceManager, nFenceId);
- geofence_destroy(geofenceH);
- geofence_manager_remove_place(g_hGeofenceManager, nPlaceId);
- return 1;
- }
-
- nRet = geofence_status_destroy(geofenceStatusH);
- PRINT_RESULT_CLEANUP(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_status_destroy", GeofenceManagerGetError(nRet), geofence_manager_remove_place(g_hGeofenceManager, nPlaceId);geofence_manager_unset_geofence_event_cb(g_hGeofenceManager));
-
- nRet = geofence_manager_remove_fence(g_hGeofenceManager, nFenceId);
- PRINT_RESULT_CLEANUP(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_manager_remove_fence", GeofenceManagerGetError(nRet), geofence_manager_remove_place(g_hGeofenceManager, nPlaceId));
-
- nRet = geofence_destroy(geofenceH);
- PRINT_RESULT_CLEANUP(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_destroy", GeofenceManagerGetError(nRet), geofence_manager_remove_place(g_hGeofenceManager, nPlaceId));
-
- nRet = geofence_manager_remove_place(g_hGeofenceManager, nPlaceId);
- PRINT_RESULT(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_manager_remove_place", GeofenceManagerGetError(nRet));
-
- return 0;
-}
-
-//& purpose: geofence status get duration
-//& type: auto
-/**
- * @testcase ITc_geofence_status_get_duration_p
- * @since_tizen 2.4
- * @author SRID(gaurav.m2)
- * @reviewer SRID(gupta.sanjay)
- * @type auto
- * @description geofence status get duration
- * @scenario Set unset geofence event callback\n
- * create/destroy geofence status\n
- * geofence status get duration
- * @apicovered geofence_manager_add_place. geofence_create_wifi, geofence_manager_add_fence, geofence_status_create, geofence_status_get_duration, geofence_status_destroy, geofence_manager_remove_fence, geofence_destroy, geofence_manager_remove_place
- * @passcase When geofence_manager_add_place, geofence_create_wifi, geofence_manager_add_fence, geofence_status_create, geofence_status_get_duration is successful
- * @failcase If target API fails or any precondition API fails
- * @precondition geofence_manager_create
- * @postcondition None
- */
-int ITc_geofence_status_get_duration_p(void)
-{
- START_TEST;
-
- int nPlaceId = 0, nFenceId = 0;
- char *pBssid = "88:30:8A:6C:28:16";
- geofence_h geofenceH = NULL;
- const char *pSsid = "WI-FI";
- char *pszPlaceName = "SOME_PLACE";
- geofence_status_h geofenceStatusH = NULL;
- int nDuration = -1;
-
- int nRet = geofence_manager_add_place(g_hGeofenceManager, pszPlaceName, &nPlaceId);
- PRINT_RESULT(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_manager_add_place", GeofenceManagerGetError(nRet));
- CHECK_VALUE_INT(nPlaceId, "geofence_manager_add_place");
-
- nRet = geofence_create_wifi(nPlaceId, pBssid, pSsid, &geofenceH);
- PRINT_RESULT_CLEANUP(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_create_wifi", GeofenceManagerGetError(nRet),geofence_manager_remove_place(g_hGeofenceManager, nPlaceId));
- CHECK_HANDLE(geofenceH, "geofence_create_wifi");
-
- nRet = geofence_manager_add_fence(g_hGeofenceManager, geofenceH, &nFenceId);
- PRINT_RESULT_CLEANUP(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_manager_add_fence", GeofenceManagerGetError(nRet), geofence_manager_remove_fence(g_hGeofenceManager, nFenceId));
- CHECK_HANDLE(geofenceH, "geofence_manager_add_fence");
- CHECK_VALUE_INT(nFenceId, "geofence_manager_add_fence");
-
- nRet = geofence_status_create(nFenceId, &geofenceStatusH);
- PRINT_RESULT_CLEANUP(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_status_create", GeofenceManagerGetError(nRet), geofence_manager_remove_place(g_hGeofenceManager, nPlaceId);geofence_manager_unset_geofence_event_cb(g_hGeofenceManager));
- CHECK_HANDLE(geofenceStatusH, "geofence_status_create");
-
- nRet = geofence_status_get_duration(geofenceStatusH, &nDuration);
- PRINT_RESULT_CLEANUP(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_status_get_duration", GeofenceManagerGetError(nRet), geofence_manager_unset_geofence_event_cb(g_hGeofenceManager);geofence_status_destroy(geofenceStatusH);geofence_manager_remove_place(g_hGeofenceManager, nPlaceId));
- if (nDuration == -1){
- FPRINTF("[Line : %d][%s] nDuration is not valid\\n", __LINE__, API_NAMESPACE);
- return 1;
- }
-
- nRet = geofence_status_destroy(geofenceStatusH);
- PRINT_RESULT_CLEANUP(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_status_destroy", GeofenceManagerGetError(nRet), geofence_manager_remove_place(g_hGeofenceManager, nPlaceId);geofence_manager_unset_geofence_event_cb(g_hGeofenceManager));
-
- nRet = geofence_manager_remove_fence(g_hGeofenceManager, nFenceId);
- PRINT_RESULT_CLEANUP(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_manager_remove_fence", GeofenceManagerGetError(nRet), geofence_manager_remove_place(g_hGeofenceManager, nPlaceId));
-
- nRet = geofence_destroy(geofenceH);
- PRINT_RESULT_CLEANUP(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_destroy", GeofenceManagerGetError(nRet), geofence_manager_remove_place(g_hGeofenceManager, nPlaceId));
-
- nRet = geofence_manager_remove_place(g_hGeofenceManager, nPlaceId);
- PRINT_RESULT(GEOFENCE_MANAGER_ERROR_NONE, nRet, "geofence_manager_remove_place", GeofenceManagerGetError(nRet));
-
- return 0;
-}
-
-/** @} */ //end of itc-geofence
-/** @} */ //end of itc-geofence-testcases
+++ /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-geofence-manager-native_mobile.h"
-#endif //MOBILE //End MOBILE
-
-#ifdef WEARABLE //Starts WEARABLE
-#include "tct-geofence-manager-native_wearable.h"
-#endif //WEARABLE //End WEARABLE
-
-#ifdef TV //Starts TV
-#include "tct-geofence-manager-native_tv.h"
-#endif //TV //End TV
-
-#ifdef TIZENIOT //Starts TIZENIOT
-#include "tct-geofence-manager-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_GEOFENCE-MANAGER-NATIVE_H__
-#define __TCT_GEOFENCE-MANAGER-NATIVE_H__
-
-#include "testcase.h"
-#include "tct_common.h"
-
-extern void ITs_geofence_manager_startup(void);
-extern void ITs_geofence_manager_cleanup(void);
-extern void ITs_geofence_startup(void);
-extern void ITs_geofence_cleanup(void);
-
-extern int ITc_geofence_manager_is_supported_p(void);
-extern int ITc_geofence_manager_create_destroy_p(void);
-extern int ITc_geofence_manager_set_unset_geofence_event_cb_p(void);
-extern int ITc_geofence_manager_start_stop_p(void);
-extern int ITc_geofence_manager_add_update_remove_place_p(void);
-extern int ITc_geofence_manager_set_unset_geofence_state_changed_cb_p(void);
-extern int ITc_geofence_manager_add_remove_fence_p(void);
-extern int ITc_geofence_manager_foreach_geofence_list_p(void);
-extern int ITc_geofence_manager_foreach_place_geofence_list_p(void);
-extern int ITc_geofence_manager_foreach_place_list_p(void);
-extern int ITc_geofence_manager_get_place_name_p(void);
-extern int ITc_geofence_manager_set_unset_geofence_proximity_state_changed_cb_p(void);
-extern int ITc_geofence_get_type_p(void);
-extern int ITc_geofence_get_place_id_p(void);
-extern int ITc_geofence_get_latitude_p(void);
-extern int ITc_geofence_get_longitude_p(void);
-extern int ITc_geofence_get_radius_p(void);
-extern int ITc_geofence_get_bssid_p(void);
-extern int ITc_geofence_get_ssid_p(void);
-extern int ITc_geofence_get_address_p(void);
-extern int ITc_geofence_create_geopoint_desroy_p(void);
-extern int ITc_geofence_create_bluetooth_destroy_p(void);
-extern int ITc_geofence_create_wifi_destroy_p(void);
-extern int ITc_geofence_status_create_destroy_p(void);
-extern int ITc_geofence_status_get_state_p(void);
-extern int ITc_geofence_status_get_duration_p(void);
-
-testcase tc_array[] = {
- {"ITc_geofence_manager_is_supported_p",ITc_geofence_manager_is_supported_p,ITs_geofence_manager_startup,ITs_geofence_manager_cleanup},
- {"ITc_geofence_manager_create_destroy_p",ITc_geofence_manager_create_destroy_p,ITs_geofence_manager_startup,ITs_geofence_manager_cleanup},
- {"ITc_geofence_manager_set_unset_geofence_event_cb_p",ITc_geofence_manager_set_unset_geofence_event_cb_p,ITs_geofence_manager_startup,ITs_geofence_manager_cleanup},
- {"ITc_geofence_manager_start_stop_p",ITc_geofence_manager_start_stop_p,ITs_geofence_manager_startup,ITs_geofence_manager_cleanup},
- {"ITc_geofence_manager_add_update_remove_place_p",ITc_geofence_manager_add_update_remove_place_p,ITs_geofence_manager_startup,ITs_geofence_manager_cleanup},
- {"ITc_geofence_manager_set_unset_geofence_state_changed_cb_p",ITc_geofence_manager_set_unset_geofence_state_changed_cb_p,ITs_geofence_manager_startup,ITs_geofence_manager_cleanup},
- {"ITc_geofence_manager_add_remove_fence_p",ITc_geofence_manager_add_remove_fence_p,ITs_geofence_manager_startup,ITs_geofence_manager_cleanup},
- {"ITc_geofence_manager_foreach_geofence_list_p",ITc_geofence_manager_foreach_geofence_list_p,ITs_geofence_manager_startup,ITs_geofence_manager_cleanup},
- {"ITc_geofence_manager_foreach_place_geofence_list_p",ITc_geofence_manager_foreach_place_geofence_list_p,ITs_geofence_manager_startup,ITs_geofence_manager_cleanup},
- {"ITc_geofence_manager_foreach_place_list_p",ITc_geofence_manager_foreach_place_list_p,ITs_geofence_manager_startup,ITs_geofence_manager_cleanup},
- {"ITc_geofence_manager_get_place_name_p",ITc_geofence_manager_get_place_name_p,ITs_geofence_manager_startup,ITs_geofence_manager_cleanup},
- {"ITc_geofence_manager_set_unset_geofence_proximity_state_changed_cb_p",ITc_geofence_manager_set_unset_geofence_proximity_state_changed_cb_p,ITs_geofence_manager_startup,ITs_geofence_manager_cleanup},
- {"ITc_geofence_get_type_p",ITc_geofence_get_type_p,ITs_geofence_startup,ITs_geofence_cleanup},
- {"ITc_geofence_get_place_id_p",ITc_geofence_get_place_id_p,ITs_geofence_startup,ITs_geofence_cleanup},
- {"ITc_geofence_get_latitude_p",ITc_geofence_get_latitude_p,ITs_geofence_startup,ITs_geofence_cleanup},
- {"ITc_geofence_get_longitude_p",ITc_geofence_get_longitude_p,ITs_geofence_startup,ITs_geofence_cleanup},
- {"ITc_geofence_get_radius_p",ITc_geofence_get_radius_p,ITs_geofence_startup,ITs_geofence_cleanup},
- {"ITc_geofence_get_bssid_p",ITc_geofence_get_bssid_p,ITs_geofence_startup,ITs_geofence_cleanup},
- {"ITc_geofence_get_ssid_p",ITc_geofence_get_ssid_p,ITs_geofence_startup,ITs_geofence_cleanup},
- {"ITc_geofence_get_address_p",ITc_geofence_get_address_p,ITs_geofence_startup,ITs_geofence_cleanup},
- {"ITc_geofence_create_geopoint_desroy_p",ITc_geofence_create_geopoint_desroy_p,ITs_geofence_startup,ITs_geofence_cleanup},
- {"ITc_geofence_create_bluetooth_destroy_p",ITc_geofence_create_bluetooth_destroy_p,ITs_geofence_startup,ITs_geofence_cleanup},
- {"ITc_geofence_create_wifi_destroy_p",ITc_geofence_create_wifi_destroy_p,ITs_geofence_startup,ITs_geofence_cleanup},
- {"ITc_geofence_status_create_destroy_p",ITc_geofence_status_create_destroy_p,ITs_geofence_startup,ITs_geofence_cleanup},
- {"ITc_geofence_status_get_state_p",ITc_geofence_status_get_state_p,ITs_geofence_startup,ITs_geofence_cleanup},
- {"ITc_geofence_status_get_duration_p",ITc_geofence_status_get_duration_p,ITs_geofence_startup,ITs_geofence_cleanup},
- {NULL, NULL}
-};
-
-#endif // __TCT_GEOFENCE-MANAGER-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_GEOFENCE-MANAGER-NATIVE_H__
-#define __TCT_GEOFENCE-MANAGER-NATIVE_H__
-
-#include "testcase.h"
-#include "tct_common.h"
-
-extern void ITs_geofence_manager_startup(void);
-extern void ITs_geofence_manager_cleanup(void);
-extern void ITs_geofence_startup(void);
-extern void ITs_geofence_cleanup(void);
-
-extern int ITc_geofence_manager_is_supported_p(void);
-extern int ITc_geofence_manager_create_destroy_p(void);
-extern int ITc_geofence_manager_set_unset_geofence_event_cb_p(void);
-extern int ITc_geofence_manager_start_stop_p(void);
-extern int ITc_geofence_manager_add_update_remove_place_p(void);
-extern int ITc_geofence_manager_set_unset_geofence_state_changed_cb_p(void);
-extern int ITc_geofence_manager_add_remove_fence_p(void);
-extern int ITc_geofence_manager_foreach_geofence_list_p(void);
-extern int ITc_geofence_manager_foreach_place_geofence_list_p(void);
-extern int ITc_geofence_manager_foreach_place_list_p(void);
-extern int ITc_geofence_manager_get_place_name_p(void);
-extern int ITc_geofence_manager_set_unset_geofence_proximity_state_changed_cb_p(void);
-extern int ITc_geofence_get_type_p(void);
-extern int ITc_geofence_get_place_id_p(void);
-extern int ITc_geofence_get_latitude_p(void);
-extern int ITc_geofence_get_longitude_p(void);
-extern int ITc_geofence_get_radius_p(void);
-extern int ITc_geofence_get_bssid_p(void);
-extern int ITc_geofence_get_ssid_p(void);
-extern int ITc_geofence_get_address_p(void);
-extern int ITc_geofence_create_geopoint_desroy_p(void);
-extern int ITc_geofence_create_bluetooth_destroy_p(void);
-extern int ITc_geofence_create_wifi_destroy_p(void);
-extern int ITc_geofence_status_create_destroy_p(void);
-extern int ITc_geofence_status_get_state_p(void);
-extern int ITc_geofence_status_get_duration_p(void);
-
-testcase tc_array[] = {
- {"ITc_geofence_manager_is_supported_p",ITc_geofence_manager_is_supported_p,ITs_geofence_manager_startup,ITs_geofence_manager_cleanup},
- {"ITc_geofence_manager_create_destroy_p",ITc_geofence_manager_create_destroy_p,ITs_geofence_manager_startup,ITs_geofence_manager_cleanup},
- {"ITc_geofence_manager_set_unset_geofence_event_cb_p",ITc_geofence_manager_set_unset_geofence_event_cb_p,ITs_geofence_manager_startup,ITs_geofence_manager_cleanup},
- {"ITc_geofence_manager_start_stop_p",ITc_geofence_manager_start_stop_p,ITs_geofence_manager_startup,ITs_geofence_manager_cleanup},
- {"ITc_geofence_manager_add_update_remove_place_p",ITc_geofence_manager_add_update_remove_place_p,ITs_geofence_manager_startup,ITs_geofence_manager_cleanup},
- {"ITc_geofence_manager_set_unset_geofence_state_changed_cb_p",ITc_geofence_manager_set_unset_geofence_state_changed_cb_p,ITs_geofence_manager_startup,ITs_geofence_manager_cleanup},
- {"ITc_geofence_manager_add_remove_fence_p",ITc_geofence_manager_add_remove_fence_p,ITs_geofence_manager_startup,ITs_geofence_manager_cleanup},
- {"ITc_geofence_manager_foreach_geofence_list_p",ITc_geofence_manager_foreach_geofence_list_p,ITs_geofence_manager_startup,ITs_geofence_manager_cleanup},
- {"ITc_geofence_manager_foreach_place_geofence_list_p",ITc_geofence_manager_foreach_place_geofence_list_p,ITs_geofence_manager_startup,ITs_geofence_manager_cleanup},
- {"ITc_geofence_manager_foreach_place_list_p",ITc_geofence_manager_foreach_place_list_p,ITs_geofence_manager_startup,ITs_geofence_manager_cleanup},
- {"ITc_geofence_manager_get_place_name_p",ITc_geofence_manager_get_place_name_p,ITs_geofence_manager_startup,ITs_geofence_manager_cleanup},
- {"ITc_geofence_manager_set_unset_geofence_proximity_state_changed_cb_p",ITc_geofence_manager_set_unset_geofence_proximity_state_changed_cb_p,ITs_geofence_manager_startup,ITs_geofence_manager_cleanup},
- {"ITc_geofence_get_type_p",ITc_geofence_get_type_p,ITs_geofence_startup,ITs_geofence_cleanup},
- {"ITc_geofence_get_place_id_p",ITc_geofence_get_place_id_p,ITs_geofence_startup,ITs_geofence_cleanup},
- {"ITc_geofence_get_latitude_p",ITc_geofence_get_latitude_p,ITs_geofence_startup,ITs_geofence_cleanup},
- {"ITc_geofence_get_longitude_p",ITc_geofence_get_longitude_p,ITs_geofence_startup,ITs_geofence_cleanup},
- {"ITc_geofence_get_radius_p",ITc_geofence_get_radius_p,ITs_geofence_startup,ITs_geofence_cleanup},
- {"ITc_geofence_get_bssid_p",ITc_geofence_get_bssid_p,ITs_geofence_startup,ITs_geofence_cleanup},
- {"ITc_geofence_get_ssid_p",ITc_geofence_get_ssid_p,ITs_geofence_startup,ITs_geofence_cleanup},
- {"ITc_geofence_get_address_p",ITc_geofence_get_address_p,ITs_geofence_startup,ITs_geofence_cleanup},
- {"ITc_geofence_create_geopoint_desroy_p",ITc_geofence_create_geopoint_desroy_p,ITs_geofence_startup,ITs_geofence_cleanup},
- {"ITc_geofence_create_bluetooth_destroy_p",ITc_geofence_create_bluetooth_destroy_p,ITs_geofence_startup,ITs_geofence_cleanup},
- {"ITc_geofence_create_wifi_destroy_p",ITc_geofence_create_wifi_destroy_p,ITs_geofence_startup,ITs_geofence_cleanup},
- {"ITc_geofence_status_create_destroy_p",ITc_geofence_status_create_destroy_p,ITs_geofence_startup,ITs_geofence_cleanup},
- {"ITc_geofence_status_get_state_p",ITc_geofence_status_get_state_p,ITs_geofence_startup,ITs_geofence_cleanup},
- {"ITc_geofence_status_get_duration_p",ITc_geofence_status_get_duration_p,ITs_geofence_startup,ITs_geofence_cleanup},
- {NULL, NULL}
-};
-
-#endif // __TCT_GEOFENCE-MANAGER-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_GEOFENCE-MANAGER-NATIVE_H__
-#define __TCT_GEOFENCE-MANAGER-NATIVE_H__
-
-#include "testcase.h"
-#include "tct_common.h"
-
-
-
-testcase tc_array[] = {
- {NULL, NULL}
-};
-
-#endif // __TCT_GEOFENCE-MANAGER-NATIVE_H__
wearable:aarch64:itc:attach-panel;
wearable:x86:itc:attach-panel;
wearable:x86_64:itc:attach-panel;
-wearable:armv7l:itc:geofence-manager;
-wearable:aarch64:itc:geofence-manager;
-wearable:x86:itc:geofence-manager;
-wearable:x86_64:itc:geofence-manager;
wearable:armv7l:itc:screen-mirroring;
wearable:aarch64:itc:screen-mirroring;
wearable:x86:itc:screen-mirroring;
tv:armv7l:itc:telephony;
tv:armv7l:itc:capi-ui-sticker;
tv:armv7l:itc:location-manager;
-tv:armv7l:itc:geofence-manager;
tv:armv7l:itc:phonenumber-utils;
tv:armv7l:itc:contacts-service2;
tv:armv7l:itc:email;