Move extended adv and scan APIs to public ref/for/tizen
authorWootak Jung <wootak.jung@samsung.com>
Fri, 25 Aug 2023 05:16:17 +0000 (14:16 +0900)
committerWootak Jung <wootak.jung@samsung.com>
Fri, 25 Aug 2023 05:16:17 +0000 (14:16 +0900)
Change-Id: Ib4abe4f9012db5cb10c414fb3b148b3178b5710e
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
include/bluetooth.h
include/bluetooth_internal.h
include/bluetooth_type.h
include/bluetooth_type_internal.h

index 76782b8d3c1011a5cad664cf9ba0f52aef5bb33f..cd00bd2adf31e07baf844c6056667318179be0cf 100644 (file)
@@ -6461,6 +6461,201 @@ int bt_socket_accept_l2cap_channel(int requested_socket_fd);
  */
 int bt_socket_reject_l2cap_channel(int socket_fd);
 
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE
+ * @brief Starts the LE scan to find LE advertisement.
+ *
+ * @details If a LE advertisement is found, bt_adapter_le_new_scan_result_cb() will be invoked.
+ *
+ * @since_tizen 8.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/bluetooth
+ * @param[in] cb The callback to report the result of this function
+ * @param[in] user_data The user data to be passed when callback is called
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #BT_ERROR_NONE  Successful
+ * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
+ * @retval #BT_ERROR_NOT_ENABLED  Not enabled
+ * @retval #BT_ERROR_NOW_IN_PROGRESS  Operation is now in progress
+ * @retval #BT_ERROR_OPERATION_FAILED  Operation failed
+ * @retval #BT_ERROR_PERMISSION_DENIED  Permission denied
+ * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
+ *
+ * @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED.
+ * @post This function invokes bt_adapter_le_scan_result_cb().
+ *
+ * @see bt_adapter_le_new_scan_result_cb()
+ */
+int bt_adapter_le_start_scan_new(bt_adapter_le_new_scan_result_cb cb, void *user_data);
+
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE
+ * @brief Sets Bluetooth LE scan role.
+ * @since_tizen 8.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/bluetooth
+ * @param[in] role The scan role
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #BT_ERROR_NONE Successful
+ * @retval #BT_ERROR_NOT_ENABLED Adapter is not enabled
+ * @retval #BT_ERROR_INVALID_PARAMETER Parameter is invalid
+ * @retval #BT_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #BT_ERROR_NOT_SUPPORTED Not supported
+ * @pre The state of local bluetooth must be #BT_ADAPTER_ENABLED.
+ * @pre The bluetooth service must be initialized with bt_initialize().
+ * @see bt_initialize()
+ */
+int bt_adapter_le_set_scan_role(bt_adapter_le_scan_role_e role);
+
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE
+ * @brief Sets Bluetooth LE scan role.
+ * @since_tizen 8.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/bluetooth
+ * @param[in] phy The scanning phy. Valid values are one of BT_LE_ALL_PHY,
+ *                     BT_LE_1M_PHY, BT_LE_CODED_PHY.
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #BT_ERROR_NONE Successful
+ * @retval #BT_ERROR_NOT_ENABLED Adapter is not enabled
+ * @retval #BT_ERROR_INVALID_PARAMETER Parameter is invalid
+ * @retval #BT_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #BT_ERROR_NOT_SUPPORTED Not supported
+ * @pre The state of local bluetooth must be #BT_ADAPTER_ENABLED.
+ * @pre The bluetooth service must be initialized with bt_initialize().
+ * @see bt_initialize()
+ */
+int bt_adapter_le_set_scan_phy(bt_adapter_le_phy_e phy);
+
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE
+ * @brief Sets Bluetooth LE scan role.
+ * @since_tizen 8.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/bluetooth
+ * @param[in] isLegacy Advertisement is extended or legacy
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #BT_ERROR_NONE Successful
+ * @retval #BT_ERROR_NOT_ENABLED Adapter is not enabled
+ * @retval #BT_ERROR_INVALID_PARAMETER Parameter is invalid
+ * @retval #BT_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #BT_ERROR_NOT_SUPPORTED Not supported
+ * @pre The state of local bluetooth must be #BT_ADAPTER_ENABLED.
+ * @pre The bluetooth service must be initialized with bt_initialize().
+ * @see bt_initialize()
+ */
+int bt_adapter_le_set_advertising_legacy_mode(bt_advertiser_h advertiser, bool isLegacy);
+
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE
+ * @brief Sets Bluetooth LE scan role.
+ * @since_tizen 8.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/bluetooth
+ * @param[in] primary_phy Primary phy of advertiser. Valid values are BT_LE_1M_PHY, BT_LE_CODED_PHY.
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #BT_ERROR_NONE Successful
+ * @retval #BT_ERROR_NOT_ENABLED Adapter is not enabled
+ * @retval #BT_ERROR_INVALID_PARAMETER Parameter is invalid
+ * @retval #BT_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #BT_ERROR_NOT_SUPPORTED Not supported
+ * @pre The state of local bluetooth must be #BT_ADAPTER_ENABLED.
+ * @pre The bluetooth service must be initialized with bt_initialize().
+ * @see bt_initialize()
+ */
+int bt_adapter_le_set_advertising_primary_phy(bt_advertiser_h advertiser,
+       bt_adapter_le_phy_e primary_phy);
+
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE
+ * @brief Sets Bluetooth LE scan role.
+ * @since_tizen 8.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/bluetooth
+ * @param[in] secondary_phy Secondary phy of advertiser, Valid values are BT_LE_1M_PHY,
+ *                                     BT_LE_2M_PHY, BT_LE_CODED_PHY.
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #BT_ERROR_NONE Successful
+ * @retval #BT_ERROR_NOT_ENABLED Adapter is not enabled
+ * @retval #BT_ERROR_INVALID_PARAMETER Parameter is invalid
+ * @retval #BT_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #BT_ERROR_NOT_SUPPORTED Not supported
+ * @pre The state of local bluetooth must be #BT_ADAPTER_ENABLED.
+ * @pre The bluetooth service must be initialized with bt_initialize().
+ * @see bt_initialize()
+ */
+int bt_adapter_le_set_advertising_secondary_phy(bt_advertiser_h advertiser,
+               bt_adapter_le_phy_e secondary_phy);
+
+/**
+ * @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);
+
 #ifdef __cplusplus
 }
 #endif /* __cplusplus */
index d28faf44ebb112255d3fc1f3410397d64aeebe14..13a2c3910b7c580184dbd955b52104358007005d 100644 (file)
@@ -670,138 +670,6 @@ int bt_adapter_set_manufacturer_data(char *data, int len);
  */
 int bt_adapter_le_is_scan_filter_supported(bool *is_supported);
 
-/**
- * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE
- * @brief Starts the LE scan to find LE advertisement.
- *
- * @details If a LE advertisement is found, bt_adapter_le_new_scan_result_cb() will be invoked.
- *
- * @since_tizen 8.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/bluetooth
- * @param[in] cb The callback to report the result of this function
- * @param[in] user_data The user data to be passed when callback is called
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #BT_ERROR_NONE  Successful
- * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
- * @retval #BT_ERROR_NOT_ENABLED  Not enabled
- * @retval #BT_ERROR_NOW_IN_PROGRESS  Operation is now in progress
- * @retval #BT_ERROR_OPERATION_FAILED  Operation failed
- * @retval #BT_ERROR_PERMISSION_DENIED  Permission denied
- * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
- *
- * @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED.
- * @post This function invokes bt_adapter_le_scan_result_cb().
- *
- * @see bt_adapter_le_new_scan_result_cb()
- */
-int bt_adapter_le_start_scan_new(bt_adapter_le_new_scan_result_cb cb, void *user_data);
-
-/**
- * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE
- * @brief Sets Bluetooth LE scan role.
- * @since_tizen 8.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/bluetooth
- * @param[in] role The scan role
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #BT_ERROR_NONE Successful
- * @retval #BT_ERROR_NOT_ENABLED Adapter is not enabled
- * @retval #BT_ERROR_INVALID_PARAMETER Parameter is invalid
- * @retval #BT_ERROR_PERMISSION_DENIED Permission denied
- * @retval #BT_ERROR_NOT_SUPPORTED Not supported
- * @pre The state of local bluetooth must be #BT_ADAPTER_ENABLED.
- * @pre The bluetooth service must be initialized with bt_initialize().
- * @see bt_initialize()
- */
-int bt_adapter_le_set_scan_role(bt_adapter_le_scan_role_e role);
-
-/**
- * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE
- * @brief Sets Bluetooth LE scan role.
- * @since_tizen 8.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/bluetooth
- * @param[in] phy The scanning phy. Valid values are one of BT_LE_ALL_PHY,
- *                     BT_LE_1M_PHY, BT_LE_CODED_PHY.
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #BT_ERROR_NONE Successful
- * @retval #BT_ERROR_NOT_ENABLED Adapter is not enabled
- * @retval #BT_ERROR_INVALID_PARAMETER Parameter is invalid
- * @retval #BT_ERROR_PERMISSION_DENIED Permission denied
- * @retval #BT_ERROR_NOT_SUPPORTED Not supported
- * @pre The state of local bluetooth must be #BT_ADAPTER_ENABLED.
- * @pre The bluetooth service must be initialized with bt_initialize().
- * @see bt_initialize()
- */
-int bt_adapter_le_set_scan_phy(bt_adapter_le_phy_e phy);
-
-/**
- * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE
- * @brief Sets Bluetooth LE scan role.
- * @since_tizen 8.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/bluetooth
- * @param[in] isLegacy Advertisement is extended or legacy
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #BT_ERROR_NONE Successful
- * @retval #BT_ERROR_NOT_ENABLED Adapter is not enabled
- * @retval #BT_ERROR_INVALID_PARAMETER Parameter is invalid
- * @retval #BT_ERROR_PERMISSION_DENIED Permission denied
- * @retval #BT_ERROR_NOT_SUPPORTED Not supported
- * @pre The state of local bluetooth must be #BT_ADAPTER_ENABLED.
- * @pre The bluetooth service must be initialized with bt_initialize().
- * @see bt_initialize()
- */
-int bt_adapter_le_set_advertising_legacy_mode(bt_advertiser_h advertiser, bool isLegacy);
-
-/**
- * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE
- * @brief Sets Bluetooth LE scan role.
- * @since_tizen 8.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/bluetooth
- * @param[in] primary_phy Primary phy of advertiser. Valid values are BT_LE_1M_PHY, BT_LE_CODED_PHY.
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #BT_ERROR_NONE Successful
- * @retval #BT_ERROR_NOT_ENABLED Adapter is not enabled
- * @retval #BT_ERROR_INVALID_PARAMETER Parameter is invalid
- * @retval #BT_ERROR_PERMISSION_DENIED Permission denied
- * @retval #BT_ERROR_NOT_SUPPORTED Not supported
- * @pre The state of local bluetooth must be #BT_ADAPTER_ENABLED.
- * @pre The bluetooth service must be initialized with bt_initialize().
- * @see bt_initialize()
- */
-int bt_adapter_le_set_advertising_primary_phy(bt_advertiser_h advertiser,
-       bt_adapter_le_phy_e primary_phy);
-
-/**
- * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE
- * @brief Sets Bluetooth LE scan role.
- * @since_tizen 8.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/bluetooth
- * @param[in] secondary_phy Secondary phy of advertiser, Valid values are BT_LE_1M_PHY,
- *                                     BT_LE_2M_PHY, BT_LE_CODED_PHY.
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #BT_ERROR_NONE Successful
- * @retval #BT_ERROR_NOT_ENABLED Adapter is not enabled
- * @retval #BT_ERROR_INVALID_PARAMETER Parameter is invalid
- * @retval #BT_ERROR_PERMISSION_DENIED Permission denied
- * @retval #BT_ERROR_NOT_SUPPORTED Not supported
- * @pre The state of local bluetooth must be #BT_ADAPTER_ENABLED.
- * @pre The bluetooth service must be initialized with bt_initialize().
- * @see bt_initialize()
- */
-int bt_adapter_le_set_advertising_secondary_phy(bt_advertiser_h advertiser,
-               bt_adapter_le_phy_e secondary_phy);
-
 /**
  * @internal
  * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE
@@ -1330,69 +1198,6 @@ int bt_adapter_le_set_advertising_transport_discovery_data(bt_advertiser_h adver
                bt_tds_transport_e org_id, char tds_flags,
                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
index 2d0d8234e7d06ef66e159588085e0c49d284a896..72dca5f77332a9c4b358056477aa9636095e54da 100644 (file)
@@ -2204,6 +2204,61 @@ typedef struct {
 typedef void (*bt_socket_l2cap_channel_connection_state_changed_cb)
        (int result, bt_socket_connection_state_e connection_state, bt_socket_l2cap_le_connection_s *connection, void *user_data);
 
+/**
+* @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE
+* @brief Enumerations of the Bluetooth LE scan role.
+* @since_tizen 8.0
+*/
+typedef enum {
+       BT_ADAPTER_LE_SCAN_ALL = 0x00,
+       BT_ADAPTER_LE_SCAN_LEGACY_ONLY,
+       BT_ADAPTER_LE_SCAN_EXTENDED_ONLY
+} bt_adapter_le_scan_role_e;
+
+/**
+* @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE
+* @brief Enumerations of the Bluetooth LE phy.
+* @since_tizen 8.0
+*/
+typedef enum {
+       BT_LE_ALL_PHY = 0x00,
+       BT_LE_1M_PHY = 0x01,
+       BT_LE_2M_PHY = 0x02,
+       BT_LE_CODED_PHY = 0x03
+} bt_adapter_le_phy_e;
+
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE
+ * @brief Structure of le scan result information containing extended and legacy scan
+ * @since_tizen 8.0
+ *
+ * @see bt_adapter_le_new_scan_result_cb()
+ */
+typedef struct {
+       int event_type;
+       int primary_phy;
+       int secondary_phy;
+       int advertising_sid;
+       int tx_power;
+       int periodic_adv_int;
+       bool is_extended;
+       bt_adapter_le_device_scan_result_info_s *legacy_scan_result;
+} bt_adapter_le_new_device_scan_result_info_s;
+
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE
+ * @brief Called when the LE advertisement has been found.
+ * @since_tizen 8.0
+ *
+ * @param[in] result The result of the LE scan
+ * @param[in] info The information of the found LE advertisement.
+ * @param[in] user_data The user data passed from the start function
+ *
+ * @see bt_adapter_le_start_scan_new()
+ */
+typedef void (*bt_adapter_le_new_scan_result_cb)(int result,
+               bt_adapter_le_new_device_scan_result_info_s *info, void *user_data);
+
 #ifdef __cplusplus
 }
 #endif /* __cplusplus */
index 1c3d7a4cae83dde449ce9e3b34613845dc998c57..37224fbb8b7ddcff744caf1e48710018222f23d1 100644 (file)
@@ -383,29 +383,6 @@ typedef enum {
        BT_ADAPTER_LE_ACTIVE_SCAN
 } bt_adapter_le_scan_type_e;
 
-/**
-* @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE
-* @since_tizen 8.0
-* @brief  Enumerations of the Bluetooth LE scan role.
-*/
-typedef enum {
-       BT_ADAPTER_LE_SCAN_ALL = 0x00,
-       BT_ADAPTER_LE_SCAN_LEGACY_ONLY,
-       BT_ADAPTER_LE_SCAN_EXTENDED_ONLY
-} bt_adapter_le_scan_role_e;
-
-/**
-* @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE
-* @since_tizen 8.0
-* @brief  Enumerations of the Bluetooth LE phy.
-*/
-typedef enum {
-       BT_LE_ALL_PHY = 0x00,
-       BT_LE_1M_PHY = 0x01,
-       BT_LE_2M_PHY = 0x02,
-       BT_LE_CODED_PHY = 0x03
-} bt_adapter_le_phy_e;
-
 /**
  * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE
  * @brief  Called when the manufacturer dat changes.
@@ -993,19 +970,6 @@ typedef void (*bt_tds_provider_scan_result_cb)(int result, const char *remote_ad
                bt_tds_transport_block_list_s *info, bt_adapter_le_device_scan_result_info_s *scan_info,
                void *user_data);
 
-typedef struct {
-       int event_type;
-       int primary_phy;
-       int secondary_phy;
-       int advertising_sid;
-       int tx_power;
-       int periodic_adv_int;
-       bool is_extended;
-       bt_adapter_le_device_scan_result_info_s *legacy_scan_result;
-} bt_adapter_le_new_device_scan_result_info_s;
-
-typedef void (*bt_adapter_le_new_scan_result_cb)(int result,
-               bt_adapter_le_new_device_scan_result_info_s *info, void *user_data);
 /**
  * @internal
  * @since_tizen 3.0