Publish IPSP APIs to Native public API 34/118134/7
authorLee Hyuk <hyuk0512.lee@samsung.com>
Thu, 6 Apr 2017 01:48:44 +0000 (10:48 +0900)
committerLee Hyuk <hyuk0512.lee@samsung.com>
Thu, 6 Apr 2017 01:48:44 +0000 (10:48 +0900)
Change-Id: Idd37dce8650e4d146f67703cf53ff972c1bc0a07
Signed-off-by: Lee Hyuk <hyuk0512.lee@samsung.com>
include/bluetooth.h
include/bluetooth_internal.h
include/bluetooth_type.h
include/bluetooth_type_internal.h

index c00934951171f6445d98d49a17ea0e4905b65841..923f4e7f654ba2a5b4562f415ed3c665d5ebe380 100644 (file)
@@ -1217,6 +1217,116 @@ int bt_adapter_le_create_advertiser(bt_advertiser_h *advertiser);
  */
 int bt_adapter_le_destroy_advertiser(bt_advertiser_h advertiser);
 
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_IPSP_MODULE
+ * @brief Initializes the Bluetooth IPSP (Internet Protocol Support Profile) service.
+ * @since_tizen 4.0
+ * @param[in] callback The callback called when the initialization is finished
+ * @param[in] user_data The user data to be passed to the callback function
+ * @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_OPERATION_FAILED  Operation failed
+ * @retval #BT_ERROR_NOT_SUPPORTED   Not supported
+ *
+ * @pre The Bluetooth service must be initialized with bt_initialize().
+ * @see bt_initialize()
+ */
+int bt_ipsp_initialize(bt_ipsp_init_state_changed_cb callback, void *user_data);
+
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_IPSP_MODULE
+ * @brief Deinitializes the Bluetooth IPSP (Internet Protocol Support Profile) service.
+ * @since_tizen 4.0
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #BT_ERROR_NONE  Successful
+ * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
+ * @retval #BT_ERROR_OPERATION_FAILED  Operation failed
+ * @retval #BT_ERROR_NOT_SUPPORTED   Not supported
+ *
+ * @pre The Bluetooth service must be initialized with bt_initialize().
+ * @see bt_initialize()
+ */
+int bt_ipsp_deinitialize(void);
+
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_IPSP_MODULE
+ * @brief Connects to a remote device's IPSP service over LE, asynchronously.
+ * @since_tizen 4.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/bluetooth
+ * @param[in] remote_address  The remote address
+ * @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  Not enabled
+ * @retval #BT_ERROR_OPERATION_FAILED  Operation failed
+ * @retval #BT_ERROR_PERMISSION_DENIED  Permission denied
+ * @retval #BT_ERROR_NOT_SUPPORTED   Not supported
+ *
+ * @post bt_ipsp_set_connection_state_changed_cb() will be invoked.
+ * @see bt_ipsp_set_connection_state_changed_cb()
+ */
+int bt_ipsp_connect(const char *remote_address);
+
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_IPSP_MODULE
+ * @brief Disonneicts from a remote device's IPSP service, asynchronously.
+ * @since_tizen 4.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/bluetooth
+ * @param[in] remote_address  The remote address
+ * @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  Not enabled
+ * @retval #BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED  Remote device is not connected
+ * @retval #BT_ERROR_OPERATION_FAILED  Operation failed
+ * @retval #BT_ERROR_PERMISSION_DENIED  Permission denied
+ * @retval #BT_ERROR_NOT_SUPPORTED   Not supported
+ *
+ * @pre The remote device must be connected by bt_ipsp_connect().
+ * @post bt_ipsp_set_connection_state_changed_cb() will be invoked.
+ * @see bt_ipsp_connect()
+ * @see bt_ipsp_set_connection_state_changed_cb()
+ */
+int bt_ipsp_disconnect(const char *remote_address);
+
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_IPSP_MODULE
+ * @brief  Registers a callback function that will be invoked when the connection state changes.
+ * @since_tizen 4.0
+ * @param[in] callback The callback function to register
+ * @param[in] user_data The user data to be passed to the callback function
+ * @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_SUPPORTED   Not supported
+ *
+ * @pre The Bluetooth service must be initialized with bt_initialize().
+ * @see bt_initialize()
+ */
+int bt_ipsp_set_connection_state_changed_cb(bt_ipsp_connection_state_changed_cb callback,
+                                               void *user_data);
+
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_IPSP_MODULE
+ * @brief      Unregisters the callback function called when the connection state changes.
+ * @since_tizen 4.0
+ * @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_SUPPORTED   Not supported
+ *
+ * @pre The Bluetooth service must be initialized with bt_initialize().
+ * @see bt_initialize()
+ */
+int bt_ipsp_unset_connection_state_changed_cb(void);
+
 /**
  * @deprecated Deprecated since 2.3.1
  * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE
index 977746d57f950e1987008c071f0f8a31af5f205f..ec5ccd15866d681882b8d2478e4fec7fc2637cf4 100644 (file)
@@ -3363,116 +3363,6 @@ int bt_dpm_set_data_transfer_state(bt_dpm_status_e value);
  */
 int bt_dpm_get_data_transfer_state(bt_dpm_status_e *value);
 
-/**
- * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE
- * @brief Initializes the Bluetooth IPSP(Internet Protocol Support Profile) service and set the callback.
- * @since_tizen 4.0
- * @param[in] bt_ipsp_init_state_changed_cb The callback called when the initialization is finished
- * @param[in] user_data The user data to be passed to the callback function
- * @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_OPERATION_FAILED  Operation failed
- * @retval #BT_ERROR_NOT_SUPPORTED   Not supported
- *
- * @pre The Bluetooth service must be initialized with bt_initialize().
- * @see bt_initialize()
- */
-int bt_ipsp_initialize(bt_ipsp_init_state_changed_cb callback, void *user_data);
-
-/**
- * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE
- * @brief Deinitializes the Bluetooth IPSP(Internet Protocol Support Profile) service.
- * @since_tizen 4.0
- * @return 0 on success, otherwise a negative error value.
- * @retval #BT_ERROR_NONE  Successful
- * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
- * @retval #BT_ERROR_OPERATION_FAILED  Operation failed
- * @retval #BT_ERROR_NOT_SUPPORTED   Not supported
- *
- * @pre The Bluetooth service must be initialized with bt_initialize().
- * @see bt_initialize()
- */
-int bt_ipsp_deinitialize(void);
-
-/**
- * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE
- * @brief Connects to a IPSP service over LE to remote device, asynchronously.
- * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/bluetooth
- * @param[in] remote_address  The remote address
- * @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  Not enabled
- * @retval #BT_ERROR_OPERATION_FAILED  Operation failed
- * @retval #BT_ERROR_PERMISSION_DENIED  Permission denied
- * @retval #BT_ERROR_NOT_SUPPORTED   Not supported
- *
- * @post bt_ipsp_set_connection_state_changed_cb() will be invoked.
- * @see bt_ipsp_set_connection_state_changed_cb()
- */
-int bt_ipsp_connect(const char *address);
-
-/**
- * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE
- * @brief Disonnects to a IPSP service over LE to remote device, asynchronously.
- * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/bluetooth
- * @param[in] remote_address  The remote address
- * @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  Not enabled
- * @retval #BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED  Remote device is not connected
- * @retval #BT_ERROR_OPERATION_FAILED  Operation failed
- * @retval #BT_ERROR_PERMISSION_DENIED  Permission denied
- * @retval #BT_ERROR_NOT_SUPPORTED   Not supported
- *
- * @pre The remote device must be connected by bt_ipsp_connect().
- * @post bt_ipsp_set_connection_state_changed_cb() will be invoked.
- * @see bt_ipsp_connect()
- * @see bt_ipsp_set_connection_state_changed_cb()
- */
-int bt_ipsp_disconnect(const char *address);
-
-/**
- * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE
- * @brief  Registers a callback function that will be invoked when the connection state changes.
- * @since_tizen 4.0
- * @param[in] bt_ipsp_connection_state_changed_cb The callback function to register
- * @param[in] user_data The user data to be passed to the callback function
- * @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_SUPPORTED   Not supported
- *
- * @pre The Bluetooth service must be initialized with bt_initialize().
- * @see bt_initialize()
- */
-int bt_ipsp_set_connection_state_changed_cb(bt_ipsp_connection_state_changed_cb callback,
-                                               void *user_data);
-
-/**
- * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE
- * @brief      Unregisters the callback function.
- * @since_tizen 4.0
- * @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_SUPPORTED   Not supported
- *
- * @pre The Bluetooth service must be initialized with bt_initialize().
- * @see bt_initialize()
- */
-int bt_ipsp_unset_connection_state_changed_cb(void);
-
 /**
  * @ingroup CAPI_NETWORK_BLUETOOTH_PBAP_MODULE
  * @brief Gets the pbap connected status.
index a89e68df26b0139f05dbf7c6f38a764933e5ab78..c9dffb734b48fa087f08c1cfbb05b9137a2a54f7 100644 (file)
@@ -1019,6 +1019,34 @@ typedef struct {
        int service_data_len;   /**< Service data length */
 } bt_adapter_le_service_data_s;
 
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_IPSP_MODULE
+ * @brief Called when the IPSP initialization state changes.
+ * @since_tizen 4.0
+ * @param[in] result The result of the initialization or deinitialization request
+ * @param[in] ipsp_initialized The initialized state: (@c true = initialized, @c false = deinitialized)
+ * @param[in] user_data The user data passed from the initialization request function
+ * @see bt_ipsp_initialize()
+ * @see bt_ipsp_deinitialize()
+ */
+typedef void (*bt_ipsp_init_state_changed_cb)
+               (int result, bool ipsp_initialized, void *user_data);
+
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_IPSP_MODULE
+ * @brief Called when the IPSP connection state changes.
+ * @since_tizen 4.0
+ * @param[in] result The result of the connection or disconnection request
+ * @param[in] connected The connection status: (@c true = connected, @c false = disconnected)
+ * @param[in] remote_address  Address of remote device
+ * @param[in] iface_name The network interface name for IPv6 network interface
+ * @param[in] user_data The user data passed from the callback registration function
+ * @see bt_ipsp_connect()
+ * @see bt_ipsp_disconnect()
+ */
+typedef void (*bt_ipsp_connection_state_changed_cb)
+               (int result, bool connected, const char *remote_address, const char *iface_name, void *user_data);
+
 /**
  * @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE
  * @brief Device information structure used for identifying pear device.
index 11960bb9ec146af36b36d86fa2653a85f7bf072f..22a2c699a044add1cbdfd7b30decbc018759c0d0 100644 (file)
@@ -669,33 +669,6 @@ typedef struct {
  */
 typedef void (*bt_device_att_mtu_changed_cb)(int result, bt_device_att_mtu_info_s *mtu_info, void *user_data);
 
-/**
- * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE
- * @brief IPSP Init state changed callback
- * @since_tizen 4.0
- * @param[in] result The result of the initializing or deinitializing request
- * @param[in] ipsp_initialized The initialized state: (@c true = initialized, @c false = deinitialized)
- * @param[in] user_data The user data passed from the callback registration function
- * @see bt_ipsp_initialize()
- */
-typedef void (*bt_ipsp_init_state_changed_cb)
-               (int result, bool ipsp_initialized, void *user_data);
-
-/**
- * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE
- * @brief IPSP Connection state changed callback
- * @since_tizen 4.0
- * @param[in] result The result of the connecting or disconnecting request
- * @param[in] connected The connection status: (@c true = connected, @c false = disconnected)
- * @param[in] remote_address  Address of remote device
- * @param[in] iface_name The network interface name for IPv6 network interface
- * @param[in] user_data The user data passed from the callback registration function
- * @see bt_ipsp_connect()
- * @see bt_ipsp_disconnect()
- */
-typedef void (*bt_ipsp_connection_state_changed_cb)
-               (int result, bool connected, const char *remote_address, const char *iface_name, void *user_data);
-
 /**
  * @ingroup CAPI_NETWORK_BLUETOOTH_PROXIMITY_MODULE
  * @brief The handle of a Proximity Monitor client handle which is associated with a remote device.