int bt_adapter_set_connectable_changed_cb(bt_adapter_connectable_changed_cb callback,
void *user_data)
{
- int ret = BT_ERROR_NONE;
-
BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_COMMON);
BT_CHECK_INIT_STATUS();
BT_CHECK_INPUT_PARAMETER(callback);
_bt_set_cb(BT_EVENT_CONNECTABLE_CHANGED_EVENT, callback, user_data);
- if (ret != BT_ERROR_NONE) { /* LCOV_EXCL_LINE */
- BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(ret),
- ret); /* LCOV_EXCL_LINE */
- } /* LCOV_EXCL_LINE */
-
- return ret;
+ return BT_ERROR_NONE;
}
int bt_adapter_unset_connectable_changed_cb(void)
void *user_data)
{
BT_DBG("");
- int ret = BT_ERROR_NONE;
-
BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_COMMON);
BT_CHECK_INIT_STATUS();
BT_CHECK_INPUT_PARAMETER(callback);
+
_bt_set_cb(BT_EVENT_STATE_CHANGED, callback, user_data);
- if (ret != BT_ERROR_NONE) { /* LCOV_EXCL_LINE */
- BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(ret),
- ret); /* LCOV_EXCL_LINE */
- } /* LCOV_EXCL_LINE */
- return ret;
+ return BT_ERROR_NONE;
}
/* LCOV_EXCL_START */
int bt_adapter_set_name_changed_cb(bt_adapter_name_changed_cb callback,
void *user_data)
{
- int ret = BT_ERROR_NONE;
-
BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_COMMON);
BT_CHECK_INIT_STATUS();
BT_CHECK_INPUT_PARAMETER(callback);
+
_bt_set_cb(BT_EVENT_NAME_CHANGED, callback, user_data);
- if (ret != BT_ERROR_NONE) { /* LCOV_EXCL_LINE */
- BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(ret),
- ret); /* LCOV_EXCL_LINE */
- } /* LCOV_EXCL_LINE */
- return ret;
+ return BT_ERROR_NONE;
}
int bt_adapter_set_visibility_mode_changed_cb(bt_adapter_visibility_mode_changed_cb callback,
void *user_data)
{
- int ret = BT_ERROR_NONE;
-
BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_COMMON);
BT_CHECK_INIT_STATUS();
BT_CHECK_INPUT_PARAMETER(callback);
+
_bt_set_cb(BT_EVENT_VISIBILITY_MODE_CHANGED, callback, user_data);
- if (ret != BT_ERROR_NONE) { /* LCOV_EXCL_LINE */
- BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(ret),
- ret); /* LCOV_EXCL_LINE */
- } /* LCOV_EXCL_LINE */
- return ret;
+ return BT_ERROR_NONE;
}
int bt_adapter_set_device_discovery_state_changed_cb(bt_adapter_device_discovery_state_changed_cb callback,
void *user_data)
{
- int ret = BT_ERROR_NONE;
-
BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_COMMON);
BT_CHECK_INIT_STATUS();
BT_CHECK_INPUT_PARAMETER(callback);
+
_bt_set_cb(BT_EVENT_DEVICE_DISCOVERY_STATE_CHANGED,
- callback, user_data);
- if (ret != BT_ERROR_NONE) { /* LCOV_EXCL_LINE */
- BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(ret),
- ret); /* LCOV_EXCL_LINE */
- } /* LCOV_EXCL_LINE */
- return ret;
+ return BT_ERROR_NONE;
}
#if !defined(TIZEN_PROFILE_WEARABLE) && !defined(TIZEN_PROFILE_IVI)
int bt_adapter_set_visibility_duration_changed_cb(bt_adapter_visibility_duration_changed_cb callback,
void *user_data)
{
- int ret = BT_ERROR_NONE;
-
BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_COMMON);
BT_CHECK_INIT_STATUS();
BT_CHECK_INPUT_PARAMETER(callback);
+
_bt_set_cb(BT_EVENT_VISIBILITY_DURATION_CHANGED, callback, user_data);
- if (ret != BT_ERROR_NONE) { /* LCOV_EXCL_LINE */
- BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(ret),
- ret); /* LCOV_EXCL_LINE */
- } /* LCOV_EXCL_LINE */
- return ret;
+ return BT_ERROR_NONE;
}
int bt_adapter_unset_visibility_duration_changed_cb(void)
bt_adapter_manufacturer_data_changed_cb callback,
void *user_data)
{
- int ret = BT_ERROR_NONE;
-
BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_COMMON);
BT_CHECK_INIT_STATUS();
BT_CHECK_INPUT_PARAMETER(callback);
+
_bt_set_cb(BT_EVENT_MANUFACTURER_DATA_CHANGED,
callback, user_data);
- if (ret != BT_ERROR_NONE) { /* LCOV_EXCL_LINE */
- BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(ret),
- ret); /* LCOV_EXCL_LINE */
- } /* LCOV_EXCL_LINE */
- return ret;
+ return BT_ERROR_NONE;
}
int bt_adapter_unset_manufacturer_data_changed_cb(void)
}
TC_PRT("Value : %s", str);
-
- g_free(str);
fail:
+ g_free(str);
g_free(value);
}
__bt_free_test_param(&g_test_param);
}
+ if (slot_id < 0 || slot_id >= 3) {
+ TC_PRT("Invalid slot id: %d", slot_id);
+ break;
+ }
+
advertiser = advertiser_list[slot_id];
TC_PRT("advertiser: %p", advertiser);
TC_PRT("IPSP : Current role is IPSP Sever !");
/* Sockets Layer Call: send() */
- send(ipsp_server_sock, data, strlen(data) + 1, 0);
+ n = send(ipsp_server_sock, data, strlen(data) + 1, 0);
if (n < 0)
TC_PRT("\nIPSP Error : While sending data !");
} else {
} else if (role == 1) {
if (ipsp_client_sock) {
/* Sockets Layer Call: send() */
- send(ipsp_client_sock, data, strlen(data) + 1, 0);
+ n = send(ipsp_client_sock, data, strlen(data) + 1, 0);
if (n < 0)
TC_PRT("\nIPSP Error : While sending data !");
} else {