ITs-iotcon-request.c
ITs-iotcon-resource.c
ITs-iotcon-presence.c
- #ITs-iotcon-security.c
ITs-iotcon-presence-response.c
)
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()
\ No newline at end of file
+ENDIF()
+++ /dev/null
-/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * 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-iotcon-common.h"
-
-//& set: Iotcon
-static const char *db_file = "oic_svr_db.dat";
-
-/** @addtogroup itc-iotcon
-* @ingroup itc
-* @{
-*/
-
-/**
- * @function ITs_iotcon_security_startup
- * @description Called before each test
- * @parameter NA
- * @return NA
- */
-void ITs_iotcon_security_startup(void)
-{
- g_bIotconConnect = true;
- if( ( false == TCTCheckSystemInfoFeatureSupported(IOTCON_FEATURE, API_NAMESPACE) ) && ( false == TCTCheckSystemInfoFeatureSupported(IOTCON_SECURITY_FEATURE, API_NAMESPACE) ) )
- {
- FPRINTF("[Line : %d][%s] iotcon_initialize API call returned mismatch error for unsupported feature\\n", __LINE__, API_NAMESPACE);
- g_bIotconConnect = false;
- }
- return;
-}
-
-/**
- * @function ITs_iotcon_security_cleanup
- * @description Called after each test
- * @parameter NA
- * @return NA
- */
-void ITs_iotcon_security_cleanup(void)
-{
-}
-
-
-
-static bool StorageDeviceSupportedCB(int storage_id, storage_type_e type,storage_state_e state, const char *path, void *user_data)
-{
- g_bCheckCb = true;
- char file_path[PATH_MAX] = {0};
- char **out_path = user_data;
-
- if (STORAGE_TYPE_INTERNAL == type)
- {
- snprintf(file_path, sizeof(file_path), "%s/res/%s", path, db_file);
- *out_path = strdup(file_path);
- return false;
- }
-
- return true;
-}
-
-//& type: auto
-//& purpose: scenario to get device value in iotcon device
-/**
-* @testcase ITc_iotcon_set_persistent_storage_p
-* @author SRID(asit.s)
-* @reviewer SRID(parshant.v)
-* @type auto
-* @since_tizen 3.0
-* @description scenario to set storage.
-* @scenario storage_foreach_device_supported \n
-* iotcon_set_persistent_storage \n
-* @apicovered storage_foreach_device_supported, iotcon_set_persistent_storage
-* @passcase If iotcon_set_persistent_storage passes.
-* @failcase If iotcon_set_persistent_storage fails.
-* @precondition create device
-* @postcondition NA
-*/
-
-int ITc_iotcon_set_persistent_storage_p(void)
-{
- START_TEST;
- char *path = NULL;
-
- g_bCheckCb = false;
- int nRet = storage_foreach_device_supported(StorageDeviceSupportedCB, &path);
-
- if(g_bCheckCb != true)
- {
- FPRINTF("[Line : %d][%s] callback not invoked : \\n", __LINE__, API_NAMESPACE );
- return 1;
- }
-
- if(path == NULL)
- {
- FPRINTF("[Line : %d][%s] path is NULL : \\n", __LINE__, API_NAMESPACE );
- return 1;
- }
-
- PRINT_RESULT(STORAGE_ERROR_NONE, nRet, "storage_foreach_device_supported", IotConGetError(nRet));
-
- nRet = iotcon_set_persistent_storage(path);
- FREE_MEMORY(path);
- PRINT_RESULT(STORAGE_ERROR_NONE, nRet, "iotcon_set_persistent_storage", IotConGetError(nRet));
-
- return 0;
-
-}
-/** @} */
-/** @} */
-
-
-
-//
+///
// Copyright (c) 2014 Samsung Electronics Co., Ltd.
//
// Licensed under the Apache License, Version 2.0 (the License);
extern void ITs_iotcon_cleanup(void);
extern void ITs_iotcon_attributes_startup(void);
extern void ITs_iotcon_attributes_cleanup(void);
-extern void ITs_iotcon_security_startup(void);
-extern void ITs_iotcon_security_cleanup(void);
extern void ITs_iotcon_presence_response_startup(void);
extern void ITs_iotcon_presence_response_cleanup(void);
extern int ITc_iotcon_find_device_info_p(void);
extern int ITc_iotcon_attributes_foreach_p(void);
extern int ITc_iotcon_attributes_get_keys_count_p(void);
extern int ITc_iotcon_attributes_add_get_byte_str_p(void);
-//extern int ITc_iotcon_set_persistent_storage_p(void);
extern int ITc_iotcon_set_device_name_p(void);
extern int ITc_remote_resource_get_device_name_p(void);
{"ITc_iotcon_remote_resource_get_policies_p", ITc_iotcon_remote_resource_get_policies_p, ITs_iotcon_remote_resource_startup, ITs_iotcon_remote_resource_cleanup},
{"ITc_iotcon_remote_resource_set_get_options_p", ITc_iotcon_remote_resource_set_get_options_p, ITs_iotcon_remote_resource_startup, ITs_iotcon_remote_resource_cleanup},
{"ITc_iotcon_remote_resource_get_cached_representation_p", ITc_iotcon_remote_resource_get_cached_representation_p, ITs_iotcon_remote_resource_startup, ITs_iotcon_remote_resource_cleanup},
- {"ITc_iotcon_remote_resource_set_get_time_interval_p", ITc_iotcon_remote_resource_set_get_time_interval_p, ITs_iotcon_remote_resource_startup, ITs_iotcon_remote_resource_cleanup},
+ {"ITc_iotcon_remote_resource_set_get_time_interval_p", ITc_iotcon_remote_resource_set_get_time_interval_p, ITs_iotcon_remote_resource_startup, ITs_iotcon_remote_resource_cleanup},
{"ITc_iotcon_representation_create_destroy_p", ITc_iotcon_representation_create_destroy_p, ITs_iotcon_representation_startup, ITs_iotcon_representation_cleanup},
{"ITc_iotcon_representation_clone_p", ITc_iotcon_representation_clone_p, ITs_iotcon_representation_startup, ITs_iotcon_representation_cleanup},
{"ITc_iotcon_representation_set_get_uri_path_p", ITc_iotcon_representation_set_get_uri_path_p, ITs_iotcon_representation_startup, ITs_iotcon_representation_cleanup},
{"ITc_iotcon_attributes_get_keys_count_p", ITc_iotcon_attributes_get_keys_count_p, ITs_iotcon_attributes_startup, ITs_iotcon_attributes_cleanup},
{"ITc_iotcon_attributes_add_get_byte_str_p", ITc_iotcon_attributes_add_get_byte_str_p, ITs_iotcon_attributes_startup, ITs_iotcon_attributes_cleanup},
{"ITc_iotcon_set_device_name_p", ITc_iotcon_set_device_name_p, ITs_iotcon_startup, ITs_iotcon_cleanup},
- {"ITc_remote_resource_get_device_name_p", ITc_remote_resource_get_device_name_p, ITs_iotcon_remote_resource_startup, ITs_iotcon_remote_resource_cleanup},
-// {"ITc_iotcon_set_persistent_storage_p", ITc_iotcon_set_persistent_storage_p, ITs_iotcon_security_startup, ITs_iotcon_security_cleanup},
+ {"ITc_remote_resource_get_device_name_p", ITc_remote_resource_get_device_name_p, ITs_iotcon_remote_resource_startup, ITs_iotcon_remote_resource_cleanup},
{NULL, NULL}
};
extern void ITs_iotcon_cleanup(void);
extern void ITs_iotcon_attributes_startup(void);
extern void ITs_iotcon_attributes_cleanup(void);
-extern void ITs_iotcon_security_startup(void);
-extern void ITs_iotcon_security_cleanup(void);
extern void ITs_iotcon_presence_response_startup(void);
extern void ITs_iotcon_presence_response_cleanup(void);
extern int ITc_iotcon_find_device_info_p(void);
extern int ITc_iotcon_attributes_foreach_p(void);
extern int ITc_iotcon_attributes_get_keys_count_p(void);
extern int ITc_iotcon_attributes_add_get_byte_str_p(void);
-//extern int ITc_iotcon_set_persistent_storage_p(void);
extern int ITc_iotcon_set_device_name_p(void);
extern int ITc_remote_resource_get_device_name_p(void);
{"ITc_iotcon_remote_resource_get_policies_p", ITc_iotcon_remote_resource_get_policies_p, ITs_iotcon_remote_resource_startup, ITs_iotcon_remote_resource_cleanup},
{"ITc_iotcon_remote_resource_set_get_options_p", ITc_iotcon_remote_resource_set_get_options_p, ITs_iotcon_remote_resource_startup, ITs_iotcon_remote_resource_cleanup},
{"ITc_iotcon_remote_resource_get_cached_representation_p", ITc_iotcon_remote_resource_get_cached_representation_p, ITs_iotcon_remote_resource_startup, ITs_iotcon_remote_resource_cleanup},
- {"ITc_iotcon_remote_resource_set_get_time_interval_p", ITc_iotcon_remote_resource_set_get_time_interval_p, ITs_iotcon_remote_resource_startup, ITs_iotcon_remote_resource_cleanup},
+ {"ITc_iotcon_remote_resource_set_get_time_interval_p", ITc_iotcon_remote_resource_set_get_time_interval_p, ITs_iotcon_remote_resource_startup, ITs_iotcon_remote_resource_cleanup},
{"ITc_iotcon_representation_create_destroy_p", ITc_iotcon_representation_create_destroy_p, ITs_iotcon_representation_startup, ITs_iotcon_representation_cleanup},
{"ITc_iotcon_representation_clone_p", ITc_iotcon_representation_clone_p, ITs_iotcon_representation_startup, ITs_iotcon_representation_cleanup},
{"ITc_iotcon_representation_set_get_uri_path_p", ITc_iotcon_representation_set_get_uri_path_p, ITs_iotcon_representation_startup, ITs_iotcon_representation_cleanup},
{"ITc_iotcon_attributes_get_keys_count_p", ITc_iotcon_attributes_get_keys_count_p, ITs_iotcon_attributes_startup, ITs_iotcon_attributes_cleanup},
{"ITc_iotcon_attributes_add_get_byte_str_p", ITc_iotcon_attributes_add_get_byte_str_p, ITs_iotcon_attributes_startup, ITs_iotcon_attributes_cleanup},
{"ITc_iotcon_set_device_name_p", ITc_iotcon_set_device_name_p, ITs_iotcon_startup, ITs_iotcon_cleanup},
- {"ITc_remote_resource_get_device_name_p", ITc_remote_resource_get_device_name_p, ITs_iotcon_remote_resource_startup, ITs_iotcon_remote_resource_cleanup},
-// {"ITc_iotcon_set_persistent_storage_p", ITc_iotcon_set_persistent_storage_p, ITs_iotcon_security_startup, ITs_iotcon_security_cleanup},
+ {"ITc_remote_resource_get_device_name_p", ITc_remote_resource_get_device_name_p, ITs_iotcon_remote_resource_startup, ITs_iotcon_remote_resource_cleanup},
{NULL, NULL}
};
extern void ITs_iotcon_cleanup(void);
extern void ITs_iotcon_attributes_startup(void);
extern void ITs_iotcon_attributes_cleanup(void);
-extern void ITs_iotcon_security_startup(void);
-extern void ITs_iotcon_security_cleanup(void);
extern void ITs_iotcon_presence_response_startup(void);
extern void ITs_iotcon_presence_response_cleanup(void);
extern int ITc_iotcon_find_device_info_p(void);
extern int ITc_iotcon_attributes_foreach_p(void);
extern int ITc_iotcon_attributes_get_keys_count_p(void);
extern int ITc_iotcon_attributes_add_get_byte_str_p(void);
-//extern int ITc_iotcon_set_persistent_storage_p(void);
extern int ITc_iotcon_set_device_name_p(void);
extern int ITc_remote_resource_get_device_name_p(void);
{"ITc_iotcon_attributes_add_get_byte_str_p", ITc_iotcon_attributes_add_get_byte_str_p, ITs_iotcon_attributes_startup, ITs_iotcon_attributes_cleanup},
{"ITc_iotcon_set_device_name_p", ITc_iotcon_set_device_name_p, ITs_iotcon_startup, ITs_iotcon_cleanup},
{"ITc_remote_resource_get_device_name_p", ITc_remote_resource_get_device_name_p, ITs_iotcon_remote_resource_startup, ITs_iotcon_remote_resource_cleanup},
-// {"ITc_iotcon_set_persistent_storage_p", ITc_iotcon_set_persistent_storage_p, ITs_iotcon_security_startup, ITs_iotcon_security_cleanup},
{NULL, NULL}
};
extern void ITs_iotcon_cleanup(void);
extern void ITs_iotcon_attributes_startup(void);
extern void ITs_iotcon_attributes_cleanup(void);
-extern void ITs_iotcon_security_startup(void);
-extern void ITs_iotcon_security_cleanup(void);
extern void ITs_iotcon_presence_response_startup(void);
extern void ITs_iotcon_presence_response_cleanup(void);
extern int ITc_iotcon_find_device_info_p(void);
extern int ITc_iotcon_attributes_foreach_p(void);
extern int ITc_iotcon_attributes_get_keys_count_p(void);
extern int ITc_iotcon_attributes_add_get_byte_str_p(void);
-//extern int ITc_iotcon_set_persistent_storage_p(void);
extern int ITc_iotcon_set_device_name_p(void);
extern int ITc_remote_resource_get_device_name_p(void);
{"ITc_iotcon_attributes_add_get_byte_str_p", ITc_iotcon_attributes_add_get_byte_str_p, ITs_iotcon_attributes_startup, ITs_iotcon_attributes_cleanup},
{"ITc_iotcon_set_device_name_p", ITc_iotcon_set_device_name_p, ITs_iotcon_startup, ITs_iotcon_cleanup},
{"ITc_remote_resource_get_device_name_p", ITc_remote_resource_get_device_name_p, ITs_iotcon_remote_resource_startup, ITs_iotcon_remote_resource_cleanup},
-// {"ITc_iotcon_set_persistent_storage_p", ITc_iotcon_set_persistent_storage_p, ITs_iotcon_security_startup, ITs_iotcon_security_cleanup},
{NULL, NULL}
};