unsigned char *transport_data, unsigned int transport_data_len);
/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_50_MODULE
+ * @brief Checks if LE Extended Advertising feature is supported or not.
+ * @since_tizen 8.0
+ *
+ * @remarks The LE Extended Advertising feature was introduced in the BT 5.0 core specification.
+ *
+ * @param[out] is_supported The LE Extended Advertising feature support: (@c true = supported , @c false = not supported)
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #BT_ERROR_NONE Successful
+ * @retval #BT_ERROR_NOT_INITIALIZED Not initialized
+ * @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #BT_ERROR_NOT_ENABLED Adapter is not enabled
+ * @retval #BT_ERROR_OPERATION_FAILED Operation failed
+ * @retval #BT_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED.
+ */
+int bt_adapter_le_is_extended_advertising_supported(bool *is_supported);
+
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_50_MODULE
+ * @brief Checks if LE Extended Scan feature is supported or not.
+ * @since_tizen 8.0
+ *
+ * @remarks The LE Extended Scan feature was introduced in the BT 5.0 core specification.
+ *
+ * @param[out] is_supported The LE Extended Scan feature support: (@c true = supported , @c false = not supported)
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #BT_ERROR_NONE Successful
+ * @retval #BT_ERROR_NOT_INITIALIZED Not initialized
+ * @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #BT_ERROR_NOT_ENABLED Adapter is not enabled
+ * @retval #BT_ERROR_OPERATION_FAILED Operation failed
+ * @retval #BT_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED.
+ */
+int bt_adapter_le_is_extended_scan_supported(bool *is_supported);
+
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_50_MODULE
+ * @brief Maximum advertisement data length supported by controller
+ * @since_tizen 8.0
+ *
+ * @remarks The LE Maximum Advertising Data Length feature was introduced in the BT 5.0 core specification.
+ *
+ * @param[out] data_length The maximum length supported by controller for use as advertisement data or scan response data
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #BT_ERROR_NONE Successful
+ * @retval #BT_ERROR_NOT_INITIALIZED Not initialized
+ * @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #BT_ERROR_NOT_ENABLED Adapter is not enabled
+ * @retval #BT_ERROR_OPERATION_FAILED Operation failed
+ * @retval #BT_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED.
+ */
+int bt_adapter_le_get_maximum_advertising_data_length(int *data_length);
+
+/**
* @internal
* @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE
* @brief Retrieves the address of the devices connected with the specific profile.
return BT_ERROR_NONE;
}
/* LCOV_EXCL_STOP */
+
+/* LCOV_EXCL_START */
+int bt_adapter_le_is_extended_advertising_supported(bool *is_supported)
+{
+ int ret = BT_ERROR_NONE;
+ gboolean support = FALSE;
+
+ BT_CHECK_LE_5_0_SUPPORT();
+ BT_CHECK_INIT_STATUS();
+ BT_CHECK_INPUT_PARAMETER(is_supported);
+
+ ret = _bt_get_error_code(bluetooth_is_le_extended_advertising_supported(&support));
+
+ if (ret != BT_ERROR_NONE) {
+ BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(ret), ret);
+ return ret;
+ }
+
+ *is_supported = support ? true : false;
+
+ return BT_ERROR_NONE;
+}
+/* LCOV_EXCL_STOP */
+
+/* LCOV_EXCL_START */
+int bt_adapter_le_is_extended_scan_supported(bool *is_supported)
+{
+ int ret = BT_ERROR_NONE;
+ gboolean support = FALSE;
+
+ BT_CHECK_LE_5_0_SUPPORT();
+ BT_CHECK_INIT_STATUS();
+ BT_CHECK_INPUT_PARAMETER(is_supported);
+
+ ret = _bt_get_error_code(bluetooth_is_le_extended_scan_supported(&support));
+
+ if (ret != BT_ERROR_NONE) {
+ BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(ret), ret);
+ return ret;
+ }
+
+ *is_supported = support ? true : false;
+
+ return BT_ERROR_NONE;
+}
+/* LCOV_EXCL_STOP */
+
+/* LCOV_EXCL_START */
+int bt_adapter_le_get_maximum_advertising_data_length(int *data_length)
+{
+ int ret = BT_ERROR_NONE;
+ gint max_data_len = 0;
+
+ BT_CHECK_LE_5_0_SUPPORT();
+ BT_CHECK_INIT_STATUS();
+ BT_CHECK_INPUT_PARAMETER(data_length);
+
+ ret = _bt_get_error_code(bluetooth_le_get_maximum_advertising_data_length(&max_data_len));
+
+ if (ret != BT_ERROR_NONE) {
+ BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(ret), ret);
+ return ret;
+ }
+
+ *data_length = max_data_len;
+
+ return BT_ERROR_NONE;
+}
+/* LCOV_EXCL_STOP */
, BT_UNIT_TEST_FUNCTION_LE_2M_PHY_SUPPORT},
{"bt_adapter_le_is_coded_phy_supported"
, BT_UNIT_TEST_FUNCTION_LE_CODED_PHY_SUPPORT},
+ {"bt_adapter_le_is_extended_advertising_supported"
+ , BT_UNIT_TEST_FUNCTION_LE_EXTENDED_ADVERTISING_SUPPORT},
+ {"bt_adapter_le_is_extended_scan_supported"
+ , BT_UNIT_TEST_FUNCTION_LE_EXTENDED_SCAN_SUPPORT},
+ {"bt_adapter_le_get_maximum_advertising_data_length"
+ , BT_UNIT_TEST_FUNCTION_LE_GET_MAXIMUM_ADVERTISING_DATA_LENGTH},
{"Select this menu to set parameters and then select the function again."
, BT_UNIT_TEST_FUNCTION_ACTIVATE_FLAG_TO_SET_PARAMETERS},
{NULL , 0x0000},
TC_PRT("LE CODED PHY Support [%s]", is_coded_phy_supported ? "YES" : "NO");
break;
}
+ case BT_UNIT_TEST_FUNCTION_LE_EXTENDED_ADVERTISING_SUPPORT: {
+
+ TC_PRT("Check LE Extended Advertising Feature support");
+ bool is_extended_advertising_supported = FALSE;
+
+ ret = bt_adapter_le_is_extended_advertising_supported(&is_extended_advertising_supported);
+ TC_PRT("returns %s\n", __bt_get_error_message(ret));
+ TC_PRT("LE Extended Advertising Support [%s]",
+ is_extended_advertising_supported ? "YES" : "NO");
+ break;
+ }
+ case BT_UNIT_TEST_FUNCTION_LE_EXTENDED_SCAN_SUPPORT: {
+
+ TC_PRT("Check LE Extended Scan Feature support");
+ bool is_extended_scan_supported = FALSE;
+
+ ret = bt_adapter_le_is_extended_scan_supported(&is_extended_scan_supported);
+ TC_PRT("returns %s\n", __bt_get_error_message(ret));
+ TC_PRT("LE Extended Scan Support [%s]", is_extended_scan_supported ? "YES" : "NO");
+ break;
+ }
+ case BT_UNIT_TEST_FUNCTION_LE_GET_MAXIMUM_ADVERTISING_DATA_LENGTH: {
+
+ TC_PRT("Check Maximum Advertising Data Length");
+ int max_advt_len = 0;
+
+ ret = bt_adapter_le_get_maximum_advertising_data_length(&max_advt_len);
+ TC_PRT("returns %s\n", __bt_get_error_message(ret));
+ TC_PRT("LE Maximum Advertising Data Length [%d]", max_advt_len);
+ break;
+ }
case BT_UNIT_TEST_FUNCTION_ACTIVATE_FLAG_TO_SET_PARAMETERS:
need_to_set_params = true;
TC_PRT("Select the function again");
BT_UNIT_TEST_FUNCTION_ADAPTER_LE_READ_HOST_SUGGESTED_DEFAULT_DATA_LENGTH,
BT_UNIT_TEST_FUNCTION_LE_2M_PHY_SUPPORT,
BT_UNIT_TEST_FUNCTION_LE_CODED_PHY_SUPPORT,
+ BT_UNIT_TEST_FUNCTION_LE_EXTENDED_ADVERTISING_SUPPORT,
+ BT_UNIT_TEST_FUNCTION_LE_EXTENDED_SCAN_SUPPORT,
+ BT_UNIT_TEST_FUNCTION_LE_GET_MAXIMUM_ADVERTISING_DATA_LENGTH,
BT_UNIT_TEST_FUNCTION_DEVICE_SET_AUTHORIZATION_TRUE = 1,
BT_UNIT_TEST_FUNCTION_DEVICE_SET_AUTHORIZATION_FALSE,
BT_UNIT_TEST_FUNCTION_DEVICE_SET_AUTHORIZATION_CHANGED_CB,
return BLUETOOTH_ERROR_NONE;
}
+API int bluetooth_is_le_extended_advertising_supported(gboolean *is_supported)
+{
+ *is_supported = TRUE;
+ return BLUETOOTH_ERROR_NONE;
+}
+
+API int bluetooth_is_le_extended_scan_supported(gboolean *is_supported)
+{
+ *is_supported = TRUE;
+ return BLUETOOTH_ERROR_NONE;
+}
+
+API int bluetooth_le_get_maximum_advertising_data_length(gint *max_data_len)
+{
+ *max_data_len = 31;
+ return BLUETOOTH_ERROR_NONE;
+}
+
API int bluetooth_av_connect(bluetooth_device_address_t *remote_address)
{
return BLUETOOTH_ERROR_NONE;