From: DoHyun Pyun Date: Thu, 18 Apr 2019 08:29:08 +0000 (+0900) Subject: Remove IPSP implementation code X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d2a7c368fad76eecfb5db2b66712569b54a8da96;p=platform%2Fcore%2Fapi%2Fbluetooth.git Remove IPSP implementation code Change-Id: I519449d4db3d6245139804d9ea4850c6fd2bad0d Signed-off-by: DoHyun Pyun --- diff --git a/src/bluetooth-common.c b/src/bluetooth-common.c index ce571a3..763e5cd 100644 --- a/src/bluetooth-common.c +++ b/src/bluetooth-common.c @@ -1305,7 +1305,6 @@ static void __bt_event_proxy(int event, bluetooth_event_param_t *param, void *us media_metadata_attributes_t *metadata = NULL; bluetooth_authentication_request_info_t *auth_information = NULL; bt_le_data_length_params_t *data_length_info = NULL; - bt_ipsp_connection_info_t *bt_ipsp_iface_info = NULL; #ifdef TIZEN_GATT_CLIENT bt_gatt_char_property_t *char_prop = NULL; @@ -2778,27 +2777,9 @@ static void __bt_event_proxy(int event, bluetooth_event_param_t *param, void *us } case BLUETOOTH_EVENT_IPSP_CONNECTED: BT_INFO("BLUETOOTH_EVENT_IPSP_CONNECTED"); - bt_ipsp_iface_info = (bt_ipsp_connection_info_t *)(param->param_data); - _bt_convert_address_to_string(&device_addr, &bt_ipsp_iface_info->btaddr); - - ((bt_ipsp_connection_state_changed_cb)bt_event_slot_container[event_index].callback) - (_bt_get_error_code(param->result), TRUE, device_addr, bt_ipsp_iface_info->if_name, - bt_event_slot_container[event_index].user_data); - - if (device_addr != NULL) - free(device_addr); break; case BLUETOOTH_EVENT_IPSP_DISCONNECTED: BT_INFO("BLUETOOTH_EVENT_IPSP_DISCONNECTED"); - bt_ipsp_iface_info = (bt_ipsp_connection_info_t *)(param->param_data); - _bt_convert_address_to_string(&device_addr, &bt_ipsp_iface_info->btaddr); - - ((bt_ipsp_connection_state_changed_cb)bt_event_slot_container[event_index].callback) - (_bt_get_error_code(param->result), FALSE, device_addr, bt_ipsp_iface_info->if_name, - bt_event_slot_container[event_index].user_data); - - if (device_addr != NULL) - free(device_addr); break; case BLUETOOTH_EVENT_GATT_ATT_MTU_CHANGED: { bt_gatt_client_att_mtu_info_s *mtu_info = NULL; @@ -3153,9 +3134,6 @@ static void __bt_event_proxy(int event, bluetooth_event_param_t *param, void *us } case BLUETOOTH_EVENT_IPSP_INIT_STATE_CHANGED: { BT_DBG("BLUETOOTH_EVENT_IPSP_INIT_STATE_CHANGED"); /* LCOV_EXCL_LINE */ - ((bt_ipsp_init_state_changed_cb)bt_event_slot_container[event_index].callback) /* LCOV_EXCL_LINE */ - (_bt_get_error_code(param->result), *(bool *)(param->param_data), /* LCOV_EXCL_LINE */ - bt_event_slot_container[event_index].user_data); break; } case BLUETOOTH_EVENT_PXP_PROPERTY_CHANGED: { diff --git a/src/bluetooth-ipsp.c b/src/bluetooth-ipsp.c index a1c9e6b..3d92e55 100644 --- a/src/bluetooth-ipsp.c +++ b/src/bluetooth-ipsp.c @@ -14,141 +14,37 @@ * limitations under the License. */ -#include -#include -#include -#include -#include -#include -#include - #include "bluetooth.h" #include "bluetooth_internal.h" #include "bluetooth_private.h" -static bool is_ipsp_initialized = false; - -#define BT_CHECK_IPSP_SUPPORT() \ -{ \ - BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_COMMON); \ - BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_IPSP); \ -} - -#define BT_CHECK_IPSP_INIT_STATUS() \ - if (__bt_check_ipsp_init_status() == BT_ERROR_NOT_INITIALIZED) { \ - LOGE("[%s] NOT_INITIALIZED(0x%08x)", __FUNCTION__, BT_ERROR_NOT_INITIALIZED); \ - return BT_ERROR_NOT_INITIALIZED; \ - } -/* LCOV_EXCL_START */ -int __bt_check_ipsp_init_status(void) -{ - if (is_ipsp_initialized != true) { - BT_ERR("NOT_INITIALIZED(0x%08x)", BT_ERROR_NOT_INITIALIZED); - return BT_ERROR_NOT_INITIALIZED; - } - - return BT_ERROR_NONE; -} - int bt_ipsp_initialize(bt_ipsp_init_state_changed_cb callback, void *user_data) { - int error; - - if (is_ipsp_initialized) - return BT_ERROR_ALREADY_DONE; - - BT_CHECK_IPSP_SUPPORT(); - BT_CHECK_INIT_STATUS(); - BT_CHECK_INPUT_PARAMETER(callback); - - error = bluetooth_ipsp_init(); - error = _bt_get_error_code(error); - if (BT_ERROR_NONE != error) { - BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error), error); - return error; - } - - _bt_set_cb(BT_EVENT_IPSP_INIT_STATE_CHANGED, callback, user_data); - - is_ipsp_initialized = true; - return BT_ERROR_NONE; + return BT_ERROR_NOT_SUPPORTED; } int bt_ipsp_deinitialize(void) { - int error; - - BT_CHECK_IPSP_SUPPORT(); - BT_CHECK_INIT_STATUS(); - BT_CHECK_IPSP_INIT_STATUS(); - - error = bluetooth_ipsp_deinit(); - error = _bt_get_error_code(error); - if (BT_ERROR_NONE != error) { - BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error), error); - return error; - } - - is_ipsp_initialized = false; - return BT_ERROR_NONE; + return BT_ERROR_NOT_SUPPORTED; } int bt_ipsp_connect(const char *address) { - int ret; - bluetooth_device_address_t bd_addr = { {0,} }; - - BT_CHECK_IPSP_SUPPORT(); - BT_CHECK_INIT_STATUS(); - BT_CHECK_INPUT_PARAMETER(address); - - _bt_convert_address_to_hex(&bd_addr, address); - - ret = _bt_get_error_code(bluetooth_ipsp_connect((ipsp_device_address_t *)&bd_addr)); - - if (ret != BT_ERROR_NONE) - BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(ret), ret); - - return ret; + return BT_ERROR_NOT_SUPPORTED; } int bt_ipsp_disconnect(const char *address) { - int ret; - bluetooth_device_address_t bd_addr = { {0,} }; - - BT_CHECK_IPSP_SUPPORT(); - BT_CHECK_INIT_STATUS(); - BT_CHECK_INPUT_PARAMETER(address); - - _bt_convert_address_to_hex(&bd_addr, address); - - ret = _bt_get_error_code(bluetooth_ipsp_disconnect((ipsp_device_address_t *)&bd_addr)); - - if (ret != BT_ERROR_NONE) - BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(ret), ret); - - return ret; + return BT_ERROR_NOT_SUPPORTED; } int bt_ipsp_set_connection_state_changed_cb(bt_ipsp_connection_state_changed_cb callback, void *user_data) { - BT_CHECK_IPSP_SUPPORT(); - BT_CHECK_INIT_STATUS(); - BT_CHECK_INPUT_PARAMETER(callback); - _bt_set_cb(BT_EVENT_IPSP_CONNECTION_STATUS, callback, user_data); - - return BT_ERROR_NONE; + return BT_ERROR_NOT_SUPPORTED; } int bt_ipsp_unset_connection_state_changed_cb(void) { - BT_CHECK_IPSP_SUPPORT(); - BT_CHECK_INIT_STATUS(); - - _bt_unset_cb(BT_EVENT_IPSP_CONNECTION_STATUS); - return BT_ERROR_NONE; + return BT_ERROR_NOT_SUPPORTED; } - -/* LCOV_EXCL_STOP */