*/
int bt_deinitialize(void);
-/**
- * @internal
- * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE
- * @brief Enables the local Bluetooth adapter, asynchronously.
- * @since_tizen 2.3
- * @privlevel platform
- * @privilege %http://tizen.org/privilege/bluetooth.admin
- *
- * @details This function enables Bluetooth protocol stack and hardware.
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #BT_ERROR_NONE Successful
- * @retval #BT_ERROR_NOT_INITIALIZED Not initialized
- * @retval #BT_ERROR_ALREADY_DONE Already enabled
- * @retval #BT_ERROR_NOW_IN_PROGRESS Operation now in progress
- * @retval #BT_ERROR_PERMISSION_DENIED Permission denied
- * @retval #BT_ERROR_NOT_SUPPORTED Not supported
- *
- * @pre Bluetooth service must be initialized with bt_initialize().
- * @pre The state of local Bluetooth must be #BT_ADAPTER_DISABLED
- * @post This function invokes bt_adapter_state_changed_cb().
- *
- * @see bt_initialize()
- * @see bt_adapter_get_state()
- * @see bt_adapter_set_state_changed_cb()
- * @see bt_adapter_unset_state_changed_cb()
- * @see bt_adapter_state_changed_cb()
- *
- */
-int bt_adapter_enable(void);
-
-/**
- * @internal
- * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE
- * @brief Disables the local Bluetooth adapter, asynchronously.
- * @since_tizen 2.3
- * @privlevel platform
- * @privilege %http://tizen.org/privilege/bluetooth.admin
- *
- * @details This function disables Bluetooth protocol stack and hardware.
- *
- * @remarks You should disable Bluetooth adapter, which is helpful for saving power.
- *
- * @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 now in progress
- * @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_state_changed_cb().
- *
- * @see bt_adapter_get_state()
- * @see bt_adapter_state_changed_cb()
- * @see bt_adapter_set_state_changed_cb()
- * @see bt_adapter_unset_state_changed_cb ()
- *
- */
-int bt_adapter_disable(void);
-
-/**
- * @internal
- * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE
- * @brief Recover the local Bluetooth adapter, asynchronously.
- * @since_tizen 2.3
- * @privlevel platform
- * @privilege %http://tizen.org/privilege/bluetooth.admin
- *
- * @details This function does recovery logic, disables Bluetooth protocol stack and hardware, then enables after a few seconds.
- *
- * @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 now in progress
- * @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_state_changed_cb().
- *
- * @see bt_adapter_get_state()
- * @see bt_adapter_state_changed_cb()
- * @see bt_adapter_set_state_changed_cb()
- * @see bt_adapter_unset_state_changed_cb ()
- *
- */
-int bt_adapter_recover(void);
-
-/**
- * @internal
- * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE
- * @brief Reset the local Bluetooth adapter, synchronously.
- * @since_tizen 2.3
- * @privlevel platform
- * @privilege %http://tizen.org/privilege/bluetooth.admin
- *
- * @details This function resets Bluetooth protocol and values.
- *
- * @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_PERMISSION_DENIED Permission denied
- * @retval #BT_ERROR_NOT_SUPPORTED Not supported
- *
- * @pre Bluetooth service must be initialized with bt_initialize().
- * @post bt_adapter_state_changed_cb() will be invoked if The state of local Bluetooth was #BT_ADAPTER_ENABLED.
- *
- * @see bt_initialize()
- * @see bt_adapter_get_state()
- * @see bt_adapter_set_state_changed_cb()
- * @see bt_adapter_unset_state_changed_cb()
- * @see bt_adapter_state_changed_cb()
- *
- */
-int bt_adapter_reset(void);
-
/**
* @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE
* @brief Gets the current state of local Bluetooth adapter.
*/
int bt_adapter_get_address(char **local_address);
-/**
- * @internal
- * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE
- * @brief Gets the version of local Bluetooth adapter.
- * @since_tizen 2.3
- * @remarks The @a local_version must be released with free() by you.
- *
- * @param[out] local_version The version of local Bluetooth adapter
- *
- * @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_OUT_OF_MEMORY Out of memory
- * @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_get_version(char **local_version);
-
-/**
- * @internal
- * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE
- * @brief Gets the information regarding local Bluetooth adapter.
- * @since_tizen 2.3
- * @remarks The @a all parameters must be released with free() by you.
- *
- * @param[out] chipset Chipset name of local Bluetooth adapter
- * @param[out] firmware Firmware info. of local Bluetooth adapter
- * @param[out] stack_version Bluetooth stack version
- * @param[out] profiles The profile list of local Bluetooth adapter
- *
- * @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_OUT_OF_MEMORY Out of memory
- * @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_get_local_info(char **chipset, char **firmware, char **stack_version, char **profiles);
-
/**
* @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE
* @brief Gets the name of local Bluetooth adapter.
*/
int bt_adapter_get_visibility(bt_adapter_visibility_mode_e *mode, int *duration);
-/**
- * @internal
- * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE
- * @brief Sets the visibility mode.
- * @since_tizen 2.3
- * @privlevel platform
- * @privilege %http://tizen.org/privilege/bluetooth.admin
- *
- * @remarks #BT_ADAPTER_VISIBILITY_MODE_LIMITED_DISCOVERABLE will change to #BT_ADAPTER_VISIBILITY_MODE_NON_DISCOVERABLE
- * after the given @a duration goes.
- *
- * @param[in] discoverable_mode The Bluetooth visibility mode to set
- * @param[in] duration The duration until the visibility mode is changed to #BT_ADAPTER_VISIBILITY_MODE_NON_DISCOVERABLE (in seconds).
- * @a duration is used only for #BT_ADAPTER_VISIBILITY_MODE_LIMITED_DISCOVERABLE mode.
- *
- * @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_INVALID_PARAMETER Invalid parameter
- * @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 bt_adapter_visibility_mode_changed_cb() will be invoked if this function returns #BT_ERROR_NONE.
- *
- * @see bt_adapter_get_visibility()
- * @see bt_adapter_visibility_mode_changed_cb()
- * @see bt_adapter_set_visibility_mode_changed_cb()
- * @see bt_adapter_unset_visibility_mode_changed_cb()
- */
-int bt_adapter_set_visibility(bt_adapter_visibility_mode_e discoverable_mode, int duration);
-
/**
* @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE
* @brief Starts the device discovery, asynchronously.
int bt_adapter_remove_remote_oob_data(const char *remote_address);
/**
- * @internal
- * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE
- * @brief Registers a callback function to be invoked when the connectable state changes.
+ * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE
+ * @brief Starts the LE device discovery for a BT_ADAPTER_DEVICE_DISCOVERY_LE type.
* @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/bluetooth
*
- * @param[in] callback The callback function to register
- * @param[in] user_data The user data to be passed to the callback function
+ * @details If a LE device is discovered, bt_adapter_le_device_discovery_state_changed_cb()
+* will be invoked with #BT_ADAPTER_LE_DEVICE_DISCOVERY_FOUND, and then bt_adapter_le_device_discovery_state_changed_cb()
+ * will be called with #BT_ADAPTER_LE_DEVICE_DISCOVERY_FINISHED in case of the completion or cancellation of the discovery.
*
- * @return 0 on success, otherwise a negative error value.
+ * @remarks To connect to peer Bluetooth device, you need to know its Bluetooth address. \n
+ * The device discovery can be stopped by bt_adapter_le_stop_device_discovery().
+ *
+ * @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_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 Bluetooth service must be initialized with bt_initialize().
- * @post bt_adapter_connectable_changed_cb() will be invoked.
- *
- * @see bt_initialize()
- * @see bt_adapter_connectable_changed_cb()
- * @see bt_adapter_unset_connectable_changed_cb()
- */
-int bt_adapter_set_connectable_changed_cb(bt_adapter_connectable_changed_cb callback, void *user_data);
-
-/**
- * @internal
- * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE
- * @brief Unregisters the callback function.
- * @since_tizen 2.3
- *
- * @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().
+ * @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED.
+ * or must be #BT_ADAPTER_LE_ENABLED.
+ * @post This function invokes bt_adapter_le_device_discovery_state_changed_cb().
*
- * @see bt_initialize()
- * @see bt_adapter_set_connectable_changed_cb()
+ * @see bt_adapter_le_is_discovering()
+ * @see bt_adapter_le_device_discovery_state_changed_cb()
+ * @see bt_adapter_le_set_device_discovery_state_changed_cb()
+ * @see bt_adapter_le_unset_device_discovery_state_changed_cb()
*/
-int bt_adapter_unset_connectable_changed_cb(void);
+int bt_adapter_le_start_device_discovery(void);
/**
- * @internal
- * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE
- * @brief Gets the connectable state of local Bluetooth adapter.
+ * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE
+ * @brief Stops the LE device discovery, asynchronously.
* @since_tizen 2.3
- *
- * @remarks When connectable state is false, no device can connect to this device and visibility mode cannot be changed.
- *
- * @param[out] connectable The connectable state of local Bluetooth adapter
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/bluetooth
*
* @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_NOT_IN_PROGRESS Operation is not 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.
+ * @pre The device discovery must be in progress with bt_adapter_le_start_device_discovery().
+ * @post This function invokes bt_adapter_le_device_discovery_state_changed_cb().
*
- * @see bt_adapter_set_connectable()
+ * @see bt_adapter_le_is_discovering()
+ * @see bt_adapter_le_start_device_discovery()
+ * @see bt_adapter_le_set_device_discovery_state_changed_cb()
+ * @see bt_adapter_le_unset_device_discovery_state_changed_cb()
+ * @see bt_adapter_le_device_discovery_state_changed_cb()
*/
-int bt_adapter_get_connectable(bool *connectable);
+int bt_adapter_le_stop_device_discovery(void);
/**
- * @internal
- * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE
- * @brief Sets the connectable state of local Bluetooth adapter.
+ * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE
+ * @brief Checks for the LE device discovery is in progress or not.
* @since_tizen 2.3
- * @privlevel platform
- * @privilege %http://tizen.org/privilege/bluetooth.admin
*
- * @remarks When connectable state is false, no device can connect to this device and visibility mode cannot be changed.
- *
- * @param[in] connectable The connectable state to set
+ * @remarks If Bluetooth LE discovery is in progress, other operations are not allowed and
+ * you have to either stop the LE discovery operation, or wait for it to be finished,
+ * before performing other operations.
+
+ * @param[out] is_discovering The discovering status: (@c true = in progress , @c false = not in progress )
*
* @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
*
* @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED.
- * @post bt_adapter_connectable_changed_cb() will be invoked if this function returns #BT_ERROR_NONE.
+ * or must be #BT_ADAPTER_LE_ENABLED.
*
- * @see bt_adapter_get_connectable()
- * @see bt_adapter_connectable_changed_cb()
- * @see bt_adapter_set_connectable_changed_cb()
- * @see bt_adapter_unset_connectable_changed_cb()
+ * @see bt_adapter_le_start_device_discovery()
+ * @see bt_adapter_le_stop_device_discovery()
*/
-int bt_adapter_set_connectable(bool connectable);
+int bt_adapter_le_is_discovering(bool *is_discovering);
/**
- * @internal
* @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE
- * @brief Enables the local Bluetooth le adapter, asynchronously.
+ * @brief Registers a callback function to be invoked when the LE device discovery state changes.
* @since_tizen 2.3
- * @privlevel platform
- * @privilege %http://tizen.org/privilege/bluetooth.admin
*
- * @details This function enables Bluetooth protocol stack and hardware.
+ * @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.
+ * @return 0 on success, otherwise a negative error value.
* @retval #BT_ERROR_NONE Successful
* @retval #BT_ERROR_NOT_INITIALIZED Not initialized
- * @retval #BT_ERROR_ALREADY_DONE Already enabled
- * @retval #BT_ERROR_NOW_IN_PROGRESS Operation now in progress
- * @retval #BT_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #BT_ERROR_NOT_SUPPORTED Not supported
*
- * @pre Bluetooth service must be initialized with bt_initialize().
- * @post This function invokes bt_adapter_le_state_changed_cb().
+ * @pre The Bluetooth service must be initialized with bt_initialize().
+ * @post bt_adapter_le_device_discovery_state_changed_cb() will be invoked.
*
* @see bt_initialize()
- * @see bt_adapter_le_get_state()
- * @see bt_adapter_le_set_state_changed_cb()
- * @see bt_adapter_le_unset_state_changed_cb()
- * @see bt_adapter_le_state_changed_cb()
- *
+ * @see bt_adapter_le_device_discovery_state_changed_cb()
+ * @see bt_adapter_le_unset_device_discovery_state_changed_cb()
*/
-int bt_adapter_le_enable(void);
-
-/**
- * @internal
- * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE
- * @brief Disables the local Bluetooth le adapter, asynchronously.
- * @since_tizen 2.3
- * @privlevel platform
- * @privilege %http://tizen.org/privilege/bluetooth.admin
- *
- * @details This function disables Bluetooth le protocol stack and hardware.
- *
- * @remarks
- *
- * @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 now in progress
- * @retval #BT_ERROR_PERMISSION_DENIED Permission denied
- * @retval #BT_ERROR_NOT_SUPPORTED Not supported
- *
- * @pre The state of local Bluetooth must be #BT_ADAPTER_LE_ENABLED
- * @post This function invokes bt_adapter_le_state_changed_cb().
- *
- * @see bt_adapter_le_get_state()
- * @see bt_adapter_le_state_changed_cb()
- * @see bt_adapter_le_set_state_changed_cb()
- * @see bt_adapter_le_unset_state_changed_cb ()
- *
- */
-int bt_adapter_le_disable(void);
-
-/**
- * @internal
- * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE
- * @brief Gets the current state of local Bluetooth adapter.
- * @since_tizen 2.3
- *
- * @param[out] adapter_le_state The current adapter le state
- *
- * @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 Bluetooth service must be initialized with bt_initialize().
- *
- * @see bt_initialize()
- */
-int bt_adapter_le_get_state(bt_adapter_le_state_e *adapter_le_state);
-
-/**
- * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE
- * @brief Starts the LE device discovery for a BT_ADAPTER_DEVICE_DISCOVERY_LE type.
- * @since_tizen 2.3
- * @privlevel public
- * @privilege %http://tizen.org/privilege/bluetooth
- *
- * @details If a LE device is discovered, bt_adapter_le_device_discovery_state_changed_cb()
-* will be invoked with #BT_ADAPTER_LE_DEVICE_DISCOVERY_FOUND, and then bt_adapter_le_device_discovery_state_changed_cb()
- * will be called with #BT_ADAPTER_LE_DEVICE_DISCOVERY_FINISHED in case of the completion or cancellation of the discovery.
- *
- * @remarks To connect to peer Bluetooth device, you need to know its Bluetooth address. \n
- * The device discovery can be stopped by bt_adapter_le_stop_device_discovery().
- *
- * @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.
- * or must be #BT_ADAPTER_LE_ENABLED.
- * @post This function invokes bt_adapter_le_device_discovery_state_changed_cb().
- *
- * @see bt_adapter_le_is_discovering()
- * @see bt_adapter_le_device_discovery_state_changed_cb()
- * @see bt_adapter_le_set_device_discovery_state_changed_cb()
- * @see bt_adapter_le_unset_device_discovery_state_changed_cb()
- */
-int bt_adapter_le_start_device_discovery(void);
-
-/**
- * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE
- * @brief Stops the LE device discovery, asynchronously.
- * @since_tizen 2.3
- * @privlevel public
- * @privilege %http://tizen.org/privilege/bluetooth
- *
- * @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_NOT_IN_PROGRESS Operation is not 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 device discovery must be in progress with bt_adapter_le_start_device_discovery().
- * @post This function invokes bt_adapter_le_device_discovery_state_changed_cb().
- *
- * @see bt_adapter_le_is_discovering()
- * @see bt_adapter_le_start_device_discovery()
- * @see bt_adapter_le_set_device_discovery_state_changed_cb()
- * @see bt_adapter_le_unset_device_discovery_state_changed_cb()
- * @see bt_adapter_le_device_discovery_state_changed_cb()
- */
-int bt_adapter_le_stop_device_discovery(void);
-
-/**
- * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE
- * @brief Checks for the LE device discovery is in progress or not.
- * @since_tizen 2.3
- *
- * @remarks If Bluetooth LE discovery is in progress, other operations are not allowed and
- * you have to either stop the LE discovery operation, or wait for it to be finished,
- * before performing other operations.
-
- * @param[out] is_discovering The discovering status: (@c true = in progress , @c false = not in progress )
- *
- * @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_NOT_SUPPORTED Not supported
- *
- * @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED.
- * or must be #BT_ADAPTER_LE_ENABLED.
- *
- * @see bt_adapter_le_start_device_discovery()
- * @see bt_adapter_le_stop_device_discovery()
- */
-int bt_adapter_le_is_discovering(bool *is_discovering);
-
-/**
- * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE
- * @brief Registers a callback function to be invoked when the LE device discovery state changes.
- * @since_tizen 2.3
- *
- * @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().
- * @post bt_adapter_le_device_discovery_state_changed_cb() will be invoked.
- *
- * @see bt_initialize()
- * @see bt_adapter_le_device_discovery_state_changed_cb()
- * @see bt_adapter_le_unset_device_discovery_state_changed_cb()
- */
-int bt_adapter_le_set_device_discovery_state_changed_cb(bt_adapter_le_device_discovery_state_changed_cb callback, void *user_data);
+int bt_adapter_le_set_device_discovery_state_changed_cb(bt_adapter_le_device_discovery_state_changed_cb callback, void *user_data);
/**
* @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE
*/
int bt_adapter_le_unset_device_discovery_state_changed_cb(void);
-/**
- * @internal
- * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE
- * @brief Registers a callback function to be invoked when the Bluetooth adapter le state changes.
- * @since_tizen 2.3
- *
- * @param[in] callback The callback function to invoke
- * @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().
- * @post bt_adapter_le_state_changed_cb() will be invoked.
- *
- * @see bt_initialize()
- * @see bt_adapter_le_state_changed_cb()
- * @see bt_adapter_le_unset_state_changed_cb()
- */
-int bt_adapter_le_set_state_changed_cb(bt_adapter_le_state_changed_cb callback, void *user_data);
-
-/**
- * @internal
- * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE
- * @brief Unregisters the callback function.
- * @since_tizen 2.3
- *
- * @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()
- * @see bt_adapter_le_set_state_changed_cb()
- */
-int bt_adapter_le_unset_state_changed_cb(void);
-
-/**
- * @internal
- * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE
- * @brief add address to whitelist for accepting scanning request.
- * @since_tizen 2.3
- * @privlevel platform
- * @privilege %http://tizen.org/privilege/bluetooth.admin
- *
- * @remarks If the adress is in the whitelist then other LE devices are able to
- * search this device. Before calling this API, make sure that the adapter is
- * enabled. There is no callback event for this API.
-
- * @param[in] address The other device's address
- * @param[in] address_type The other device's address type
- *
- * @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_RESOURCE_BUSY Device or resource busy
- * @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.
- *
- * @see bt_adapter_le_start_advertising()
- * @see bt_adapter_le_stop_advertising()
- */
-int bt_adapter_le_add_white_list(const char *address, bt_device_address_type_e address_type);
-
-/**
- * @internal
- * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE
- * @brief remove address from the whitelist for not accepting scanning request.
- * @since_tizen 2.3
- * @privlevel platform
- * @privilege %http://tizen.org/privilege/bluetooth.admin
- *
- * @remarks If the adress is in the whitelist then other LE devices are able to
- * search this device. Before calling this API, make sure that the adapter is
- * enabled. There is no callback event for this API.
- *
- * @param[in] address The other device's address
- * @param[in] address_type The other device's address type
- *
- * @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_RESOURCE_BUSY Device or resource busy
- * @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.
- *
- * @see bt_adapter_le_start_advertising()
- * @see bt_adapter_le_stop_advertising()
- */
-int bt_adapter_le_remove_white_list(const char *address, bt_device_address_type_e address_type);
-
-/**
- * @internal
- * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE
- * @brief clear address from the whitelist for not accepting scanning request.
- * @since_tizen 2.3
- * @privlevel platform
- * @privilege %http://tizen.org/privilege/bluetooth.admin
- *
- * @remarks If the adress is in the whitelist then other LE devices are able to
- * search this device. Before calling this API, make sure that the adapter is
- * enabled. There is no callback event for this API.
- *
- * @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 Adapter is not enabled
- * @retval #BT_ERROR_RESOURCE_BUSY Device or resource busy
- * @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.
- *
- * @see bt_adapter_le_start_advertising()
- * @see bt_adapter_le_stop_advertising()
- */
-int bt_adapter_le_clear_white_list(void);
-
/**
* @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE
* @brief Create advertiser to advertise device's existence or respond to LE scanning reqeust.
* @retval #BT_ERROR_PERMISSION_DENIED Permission denied
* @retval #BT_ERROR_NOT_SUPPORTED Not supported
*
- * @pre The Bluetooth service must be initialized with bt_initialize().
- * @post This function invokes bt_adapter_le_advertising_state_changed_cb().
- *
- * @see bt_adapter_le_stop_advertising()
- * @see bt_adapter_le_advertising_state_changed_cb()
- */
-int bt_adapter_le_start_advertising(bt_advertiser_h advertiser, bt_adapter_le_advertising_params_s *adv_params,
- bt_adapter_le_advertising_state_changed_cb cb, void *user_data);
-/**
- * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE
- * @brief Stops the advertising.
- * @since_tizen 2.3
- * @privlevel public
- * @privilege %http://tizen.org/privilege/bluetooth
- *
- * @param[in] advertiser The handle of advertiser
- *
- * @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_NOT_IN_PROGRESS Operation is not 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 advertising must be going on with bt_adapter_le_start_advertising().
- * @post This function invokes bt_adapter_le_advertising_state_changed_cb().
- *
- * @see bt_adapter_le_start_advertising()
- * @see bt_adapter_le_advertising_state_changed_cb()
- */
-int bt_adapter_le_stop_advertising(bt_advertiser_h advertiser);
-
-/**
- * @internal
- * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE
- * @brief Sets the Privacy feature state of local Bluetooth adapter.
- * @since_tizen 2.3
- * @privlevel platform
- * @privilege %http://tizen.org/privilege/bluetooth.admin
- *
- * @param[in] enable_privacy The privacy feature to set/unset.
- *
- * @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_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.
- * @pre The state of local Bluetooth must be #BT_ADAPTER_LE_ENABLED.
+ * @pre The Bluetooth service must be initialized with bt_initialize().
+ * @post This function invokes bt_adapter_le_advertising_state_changed_cb().
*
+ * @see bt_adapter_le_stop_advertising()
+ * @see bt_adapter_le_advertising_state_changed_cb()
*/
-int bt_adapter_le_enable_privacy(bool enable_privacy);
-
+int bt_adapter_le_start_advertising(bt_advertiser_h advertiser, bt_adapter_le_advertising_params_s *adv_params,
+ bt_adapter_le_advertising_state_changed_cb cb, void *user_data);
/**
- * @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE
- * @brief Creates a bond with a remote Bluetooth device, asynchronously.
+ * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE
+ * @brief Stops the advertising.
* @since_tizen 2.3
* @privlevel public
* @privilege %http://tizen.org/privilege/bluetooth
*
- * @remarks A bond can be destroyed by bt_device_destroy_bond().\n
- * The bonding request can be cancelled by bt_device_cancel_bonding().
- *
- * @param[in] remote_address The address of the remote Bluetooth device with which the bond should be created
+ * @param[in] advertiser The handle of advertiser
*
* @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_RESOURCE_BUSY Device or resource busy
+ * @retval #BT_ERROR_NOT_IN_PROGRESS Operation is not 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.
- * @pre The remote device must be discoverable with bt_adapter_start_device_discovery().
- * @post This function invokes bt_device_bond_created_cb().
+ * @pre The advertising must be going on with bt_adapter_le_start_advertising().
+ * @post This function invokes bt_adapter_le_advertising_state_changed_cb().
*
- * @see bt_adapter_start_device_discovery()
- * @see bt_device_bond_created_cb()
- * @see bt_device_cancel_bonding()
- * @see bt_device_destroy_bond()
- * @see bt_device_set_bond_created_cb()
- * @see bt_device_unset_bond_created_cb()
+ * @see bt_adapter_le_start_advertising()
+ * @see bt_adapter_le_advertising_state_changed_cb()
*/
-int bt_device_create_bond(const char *remote_address);
+int bt_adapter_le_stop_advertising(bt_advertiser_h advertiser);
/**
- * @internal
* @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE
* @brief Creates a bond with a remote Bluetooth device, asynchronously.
* @since_tizen 2.3
- * @privlevel platform
- * @privilege %http://tizen.org/privilege/bluetooth.admin
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/bluetooth
*
* @remarks A bond can be destroyed by bt_device_destroy_bond().\n
* The bonding request can be cancelled by bt_device_cancel_bonding().
*
* @param[in] remote_address The address of the remote Bluetooth device with which the bond should be created
- * @param[in] conn_type The connection type(LE or BREDR) to create bond with remote device
*
* @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_INVALID_PARAMETER Invalid parameter
* @retval #BT_ERROR_NOT_ENABLED Not enabled
- * @retval #BT_ERROR_RESOURCE_BUSY Device or resource busy
+ * @retval #BT_ERROR_RESOURCE_BUSY Device or resource busy
* @retval #BT_ERROR_OPERATION_FAILED Operation failed
* @retval #BT_ERROR_PERMISSION_DENIED Permission denied
* @retval #BT_ERROR_NOT_SUPPORTED Not supported
* @post This function invokes bt_device_bond_created_cb().
*
* @see bt_adapter_start_device_discovery()
- * @see bt_device_create_bond()
* @see bt_device_bond_created_cb()
* @see bt_device_cancel_bonding()
* @see bt_device_destroy_bond()
* @see bt_device_set_bond_created_cb()
* @see bt_device_unset_bond_created_cb()
*/
-int bt_device_create_bond_by_type(const char *remote_address,
- bt_device_connection_link_type_e conn_type);
+int bt_device_create_bond(const char *remote_address);
/**
* @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE
*/
int bt_device_start_service_search(const char *remote_address);
-/**
- * @internal
- * @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE
- * @brief Cancels service search process.
- * @since_tizen 2.3
- * @privlevel platform
- * @privilege %http://tizen.org/privilege/bluetooth.admin
- *
- * @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_REMOTE_DEVICE_NOT_BONDED Remote device not bonded
- * @retval #BT_ERROR_NOT_IN_PROGRESS Operation not 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 service search must be in progress by bt_device_start_service_search().
- *
- * @see bt_device_start_service_search()
- * @see bt_device_service_searched_cb()
- * @see bt_device_set_service_searched_cb()
- * @see bt_device_unset_service_searched_cb()
- */
-int bt_device_cancel_service_search(void);
-
/**
* @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE
* @brief Gets the connected profiles.
*/
int bt_socket_listen_and_accept_rfcomm(int socket_fd, int max_pending_connections);
-/**
- * @internal
- * @ingroup CAPI_NETWORK_BLUETOOTH_SOCKET_MODULE
- * @brief Starts listening on passed rfcomm socket.
- * @since_tizen 2.3
- * @privlevel platform
- * @privilege %http://tizen.org/privilege/bluetooth.admin
- * @details bt_socket_connection_requested_cb() will be called when a RFCOMM connection is requested.
- *
- * @param[in] socket_fd The file descriptor socket on which start to listen
- * @param[in] max_pending_connections The number of pending connections
- *
- * @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_INVALID_PARAMETER Invalid parameter
- * @retval #BT_ERROR_OPERATION_FAILED Operation failed
- * @retval #BT_ERROR_PERMISSION_DENIED Permission denied
- * @retval #BT_ERROR_NOT_SUPPORTED Not supported
- *
- * @pre The socket must be created with bt_socket_create_rfcomm().
- * @post This function invokes bt_socket_connection_state_changed_cb().
- *
- * @see bt_socket_create_rfcomm()
- * @see bt_socket_set_connection_requested_cb()
- * @see bt_socket_unset_connection_requested_cb()
- * @see bt_socket_connection_requested_cb()
- */
-int bt_socket_listen(int socket_fd, int max_pending_connections);
-
-/**
- * @internal
- * @ingroup CAPI_NETWORK_BLUETOOTH_SOCKET_MODULE
- * @brief Accepts a connection request.
- * @since_tizen 2.3
- * @privlevel platform
- * @privilege %http://tizen.org/privilege/bluetooth.admin
- * @param[in] requested_socket_fd The file descriptor of socket on which a connection is requested
- * @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_INVALID_PARAMETER Invalid parameter
- * @retval #BT_ERROR_OPERATION_FAILED Operation failed
- * @retval #BT_ERROR_PERMISSION_DENIED Permission denied
- * @retval #BT_ERROR_NOT_SUPPORTED Not supported
- *
- * @pre The connection is requested by bt_socket_connection_requested_cb().
- * @see bt_socket_create_rfcomm()
- * @see bt_socket_connection_requested_cb()
- * @see bt_socket_listen()
- * @see bt_socket_reject()
-*/
-int bt_socket_accept(int requested_socket_fd);
-
-/**
- * @internal
- * @ingroup CAPI_NETWORK_BLUETOOTH_SOCKET_MODULE
- * @brief Rejects a connection request.
- * @since_tizen 2.3
- * @privlevel platform
- * @privilege %http://tizen.org/privilege/bluetooth.admin
- * @param[in] socket_fd The file descriptor of socket on which a connection is requested
- * @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_INVALID_PARAMETER Invalid parameter
- * @retval #BT_ERROR_OPERATION_FAILED Operation failed
- * @retval #BT_ERROR_PERMISSION_DENIED Permission denied
- * @retval #BT_ERROR_NOT_SUPPORTED Not supported
- *
- * @pre The connection is requested by bt_socket_connection_requested_cb().
- * @see bt_socket_create_rfcomm()
- * @see bt_socket_connection_requested_cb()
- * @see bt_socket_listen()
- * @see bt_socket_accept()
- */
-int bt_socket_reject(int socket_fd);
-
/**
* @ingroup CAPI_NETWORK_BLUETOOTH_SOCKET_MODULE
* @brief Connects to a specific RFCOMM based service on a remote Bluetooth device UUID, asynchronously.
*/
int bt_socket_unset_connection_state_changed_cb(void);
-/**
- * @internal
- * @ingroup CAPI_NETWORK_BLUETOOTH_OPP_SERVER_MODULE
- * @brief Initializes the Bluetooth OPP server requested by bt_opp_server_push_requested_cb().
- * @since_tizen 2.3
- * @details The popup appears when an OPP connection is requested from a remote device.
- * If you accept the request, then connection will be established and bt_opp_server_push_requested_cb() will be called.
- * At that time, you can call either bt_opp_server_accept() or bt_opp_server_reject().
- * @remarks This function must be called to start Bluetooth OPP server. You must free all resources of the Bluetooth service
- * by calling bt_opp_server_deinitialize() if Bluetooth OPP service is no longer needed.
- * @param[in] destination The destination path
- * @param[in] push_requested_cb The callback called when a push is requested
- * @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_NOT_ENABLED Not enabled
- * @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #BT_ERROR_RESOURCE_BUSY Device or resource busy
- * @retval #BT_ERROR_OPERATION_FAILED Operation failed
- * @retval #BT_ERROR_NOT_SUPPORTED Not supported
- *
- * @see bt_opp_server_push_requested_cb()
- * @see bt_opp_server_deinitialize()
- * @see bt_opp_server_accept()
- * @see bt_opp_server_reject()
- */
-int bt_opp_server_initialize(const char *destination, bt_opp_server_push_requested_cb push_requested_cb, void *user_data);
-
/**
* @ingroup CAPI_NETWORK_BLUETOOTH_OPP_SERVER_MODULE
* @brief Initializes the Bluetooth OPP server requested by bt_opp_server_connection_requested_cb().
* @since_tizen 2.3
* @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_PERMISSION_DENIED Permission denied
- * @retval #BT_ERROR_NOT_SUPPORTED Not supported
- *
- * @pre The Bluetooth audio service must be initialized with bt_audio_initialize().
- * @see bt_audio_initialize()
- */
-int bt_audio_deinitialize(void);
-
-/**
- * @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_MODULE
- * @brief Connects the remote device with the given audio profile, asynchronously.
- * @since_tizen 2.3
- * @privlevel public
- * @privilege %http://tizen.org/privilege/bluetooth
- * @details If you input type as #BT_AUDIO_PROFILE_TYPE_ALL and connection request succeeds, then bt_audio_connection_state_changed_cb() will be called twice
- * when #BT_AUDIO_PROFILE_TYPE_HSP_HFP is connected and #BT_AUDIO_PROFILE_TYPE_A2DP is connected.
- * @param[in] remote_address The remote address
- * @param[in] type The type of audio profile
- * @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_BONDED Remote device is not bonded
- * @retval #BT_ERROR_OPERATION_FAILED Operation failed
- * @retval #BT_ERROR_PERMISSION_DENIED Permission denied
- * @retval #BT_ERROR_NOT_SUPPORTED Not supported
-
- * @pre The Bluetooth audio service must be initialized with bt_audio_initialize().
- * @pre The local device must be bonded with the remote device by bt_device_create_bond().
- * @post bt_audio_connection_state_changed_cb() will be invoked.
- * @see bt_audio_disconnect()
- * @see bt_audio_connection_state_changed_cb()
- */
-int bt_audio_connect(const char *remote_address, bt_audio_profile_type_e type);
-
-/**
- * @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_MODULE
- * @brief Disconnects the remote device with the given audio profile, asynchronously.
- * @since_tizen 2.3
- * @privlevel public
- * @privilege %http://tizen.org/privilege/bluetooth
- * @details If you input type as #BT_AUDIO_PROFILE_TYPE_ALL and disconnection request succeeds, then bt_audio_connection_state_changed_cb() will be called twice
- * when #BT_AUDIO_PROFILE_TYPE_HSP_HFP is disconnected and #BT_AUDIO_PROFILE_TYPE_A2DP is disconnected.
- * @param[in] remote_address The remote address
- * @param[in] type The type of audio profile
- * @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
- *
- * @pre The remote device must be connected by bt_audio_connect().
- * @post bt_audio_connection_state_changed_cb() will be invoked.
- * @see bt_audio_connect()
- * @see bt_audio_connection_state_changed_cb()
- */
-int bt_audio_disconnect(const char *remote_address, bt_audio_profile_type_e type);
-
-/**
- * @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_MODULE
- * @brief Registers a callback function that will be invoked when the connection state is changed.
- * @since_tizen 2.3
- * @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 audio service must be initialized with bt_audio_initialize().
- * @see bt_audio_initialize()
- * @see bt_audio_connection_state_changed_cb()
- */
-int bt_audio_set_connection_state_changed_cb(bt_audio_connection_state_changed_cb callback, void *user_data);
-
-/**
- * @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_MODULE
- * @brief Unregisters a callback function that will be invoked when the connection state is changed.
- * @since_tizen 2.3
- * @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 audio service must be initialized with bt_audio_initialize().
- * @see bt_audio_initialize()
- * @see bt_audio_connection_state_changed_cb()
- * @see bt_audio_set_connection_state_changed_cb()
- */
-int bt_audio_unset_connection_state_changed_cb(void);
-
-/**
- * @internal
- * @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_AG_MODULE
- * @brief Opens a SCO(Synchronous Connection Oriented link) to connected remote device, asynchronously.
- * @since_tizen 2.3
- * @privlevel platform
- * @privilege %http://tizen.org/privilege/bluetooth.admin
- * @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_REMOTE_DEVICE_NOT_BONDED Remote device is not bonded
- * @retval #BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED Remote device is not connected
- * @retval #BT_ERROR_ALREADY_DONE Operation is already done
+ * @retval #BT_ERROR_NOT_INITIALIZED Not initialized
* @retval #BT_ERROR_OPERATION_FAILED Operation failed
* @retval #BT_ERROR_PERMISSION_DENIED Permission denied
- * @retval #BT_ERROR_NOT_SUPPORTED Not supported
+ * @retval #BT_ERROR_NOT_SUPPORTED Not supported
*
- * @pre The Bluetooth audio device must be connected with bt_audio_connect().
- * @post bt_ag_sco_state_changed_cb() will be invoked.
- * @see bt_ag_close_sco()
- * @see bt_ag_sco_state_changed_cb()
- * @see bt_audio_connect()
+ * @pre The Bluetooth audio service must be initialized with bt_audio_initialize().
+ * @see bt_audio_initialize()
*/
-int bt_ag_open_sco(void);
+int bt_audio_deinitialize(void);
/**
- * @internal
- * @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_AG_MODULE
- * @brief Closes an opened SCO(Synchronous Connection Oriented link), asynchronously.
+ * @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_MODULE
+ * @brief Connects the remote device with the given audio profile, asynchronously.
* @since_tizen 2.3
- * @privlevel platform
- * @privilege %http://tizen.org/privilege/bluetooth.admin
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/bluetooth
+ * @details If you input type as #BT_AUDIO_PROFILE_TYPE_ALL and connection request succeeds, then bt_audio_connection_state_changed_cb() will be called twice
+ * when #BT_AUDIO_PROFILE_TYPE_HSP_HFP is connected and #BT_AUDIO_PROFILE_TYPE_A2DP is connected.
+ * @param[in] remote_address The remote address
+ * @param[in] type The type of audio profile
* @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_BONDED Remote device is not bonded
- * @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 SCO must be opened with bt_ag_open_sco().
- * @post bt_ag_sco_state_changed_cb() will be invoked.
- * @see bt_ag_open_sco()
- * @see bt_ag_sco_state_changed_cb()
+
+ * @pre The Bluetooth audio service must be initialized with bt_audio_initialize().
+ * @pre The local device must be bonded with the remote device by bt_device_create_bond().
+ * @post bt_audio_connection_state_changed_cb() will be invoked.
+ * @see bt_audio_disconnect()
+ * @see bt_audio_connection_state_changed_cb()
*/
-int bt_ag_close_sco(void);
+int bt_audio_connect(const char *remote_address, bt_audio_profile_type_e type);
/**
- * @internal
- * @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_AG_MODULE
- * @brief Checks whether an opened SCO(Synchronous Connection Oriented link) exists or not.
+ * @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_MODULE
+ * @brief Disconnects the remote device with the given audio profile, asynchronously.
* @since_tizen 2.3
- * @param[out] opened The SCO status: (@c true = opened, @c false = not opened)
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/bluetooth
+ * @details If you input type as #BT_AUDIO_PROFILE_TYPE_ALL and disconnection request succeeds, then bt_audio_connection_state_changed_cb() will be called twice
+ * when #BT_AUDIO_PROFILE_TYPE_HSP_HFP is disconnected and #BT_AUDIO_PROFILE_TYPE_A2DP is disconnected.
+ * @param[in] remote_address The remote address
+ * @param[in] type The type of audio profile
* @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
*
- * @pre The Bluetooth audio service must be initialized with bt_audio_initialize().
- * @see bt_ag_open_sco()
- * @see bt_ag_close_sco()
+ * @pre The remote device must be connected by bt_audio_connect().
+ * @post bt_audio_connection_state_changed_cb() will be invoked.
+ * @see bt_audio_connect()
+ * @see bt_audio_connection_state_changed_cb()
*/
-int bt_ag_is_sco_opened(bool *opened);
+int bt_audio_disconnect(const char *remote_address, bt_audio_profile_type_e type);
/**
- * @internal
- * @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_AG_MODULE
- * @brief Registers a callback function that will be invoked when the SCO(Synchronous Connection Oriented link) state is changed.
+ * @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_MODULE
+ * @brief Registers a callback function that will be invoked when the connection state is changed.
* @since_tizen 2.3
* @param[in] callback The callback function to register
* @param[in] user_data The user data to be passed to the callback function
*
* @pre The Bluetooth audio service must be initialized with bt_audio_initialize().
* @see bt_audio_initialize()
- * @see bt_ag_sco_state_changed_cb()
- * @see bt_ag_unset_sco_state_changed_cb()
+ * @see bt_audio_connection_state_changed_cb()
*/
-int bt_ag_set_sco_state_changed_cb(bt_ag_sco_state_changed_cb callback, void *user_data);
+int bt_audio_set_connection_state_changed_cb(bt_audio_connection_state_changed_cb callback, void *user_data);
/**
- * @internal
- * @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_AG_MODULE
- * @brief Unregisters a callback function that will be invoked when the SCO(Synchronous Connection Oriented link) state is changed.
+ * @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_MODULE
+ * @brief Unregisters a callback function that will be invoked when the connection state is changed.
* @since_tizen 2.3
* @return 0 on success, otherwise a negative error value.
* @retval #BT_ERROR_NONE Successful
*
* @pre The Bluetooth audio service must be initialized with bt_audio_initialize().
* @see bt_audio_initialize()
- * @see bt_ag_sco_state_changed_cb()
- * @see bt_ag_set_sco_state_changed_cb()
+ * @see bt_audio_connection_state_changed_cb()
+ * @see bt_audio_set_connection_state_changed_cb()
*/
-int bt_ag_unset_sco_state_changed_cb(void);
+int bt_audio_unset_connection_state_changed_cb(void);
/**
* @internal
- * @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_AG_MODULE
- * @brief Notifies the call event to the remote bluetooth device.
+ * @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_MODULE
+ * @brief Initializes the Bluetooth AVRCP(Audio/Video Remote Control Profile) service.
* @since_tizen 2.3
- * @privlevel platform
- * @privilege %http://tizen.org/privilege/bluetooth.admin
- * @remarks Before notifying #BT_AG_CALL_EVENT_ANSWERED or #BT_AG_CALL_EVENT_DIALING, you should open SCO(Synchronous Connection Oriented link)
- * if Bluetooth Hands-Free need SCO connection.
- * @param[in] event The call event
- * @param[in] call_id The call ID
- * @param[in] phone_number The phone number. You must set this value in case of #BT_AG_CALL_EVENT_DIALING and #BT_AG_CALL_EVENT_INCOMING.
- * In other cases, this value can be NULL.
+ * @remarks This function must be called before Bluetooth AVRCP service. \n
+ * You must free all resources of the this service by calling bt_avrcp_target_deinitialize()
+ * if Bluetooth AVRCP service is no longer needed.
+ * @param[in] callback The callback function called when the connection state is changed
+ * @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_ENABLED Not enabled
- * @retval #BT_ERROR_REMOTE_DEVICE_NOT_BONDED Remote device is not bonded
- * @retval #BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED Remote device is not connected
- * @retval #BT_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #BT_ERROR_OPERATION_FAILED Operation failed
* @retval #BT_ERROR_NOT_SUPPORTED Not supported
*
- * @pre The Bluetooth audio device must be connected with bt_audio_connect().
- * @see bt_audio_connect()
+ * @pre The Bluetooth service must be initialized with bt_initialize().
+ * @see bt_initialize()
+ * @see bt_avrcp_target_deinitialize()
*/
-int bt_ag_notify_call_event(bt_ag_call_event_e event, unsigned int call_id, const char *phone_number);
+int bt_avrcp_target_initialize(bt_avrcp_target_connection_state_changed_cb callback, void *user_data);
/**
* @internal
- * @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_AG_MODULE
- * @brief Notifies the call list to the remote bluetooth device.
+ * @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_MODULE
+ * @brief Deinitializes the Bluetooth AVRCP(Audio/Video Remote Control Profile) service.
* @since_tizen 2.3
- * @privlevel platform
- * @privilege %http://tizen.org/privilege/bluetooth.admin
- * @param[in] list The call list
* @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_BONDED Remote device is not bonded
- * @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 Bluetooth audio device must be connected with bt_audio_connect().
- * @see bt_audio_connect()
+ * @pre The Bluetooth audio service must be initialized with bt_avrcp_target_initialize().
+ * @see bt_avrcp_target_initialize()
*/
-int bt_ag_notify_call_list(bt_call_list_h list);
+int bt_avrcp_target_deinitialize(void);
/**
* @internal
- * @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_AG_MODULE
- * @brief Notifies the state of voice recognition.
+ * @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_MODULE
+ * @brief Notifies the equalize state to the remote device.
* @since_tizen 2.3
* @privlevel platform
* @privilege %http://tizen.org/privilege/bluetooth.admin
- * @param[in] state The state of voice recognition: (@c true = enabled, @c false = disabled)
- * @return 0 on success, otherwise a negative error value.
+ * @param[in] state The state of equalizer
+ * @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_BONDED Remote device is not bonded
- * @retval #BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED Remote device is not connected
* @retval #BT_ERROR_OPERATION_FAILED Operation failed
+ * @retval #BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED Remote device is not connected
* @retval #BT_ERROR_PERMISSION_DENIED Permission denied
* @retval #BT_ERROR_NOT_SUPPORTED Not supported
*
- * @pre The Bluetooth audio device must be connected with bt_audio_connect().
- * @see bt_audio_connect()
+ * @pre The remote device must be connected.
+ * @see bt_avrcp_target_connection_state_changed_cb()
+ * @see bt_avrcp_target_initialize()
*/
-int bt_ag_notify_voice_recognition_state(bool state);
+int bt_avrcp_target_notify_equalizer_state(bt_avrcp_equalizer_state_e state);
/**
* @internal
- * @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_AG_MODULE
- * @brief Registers a callback function that will be invoked when a call handling event happened from Hands-Free.
+ * @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_MODULE
+ * @brief Notifies the repeat mode to the remote device.
* @since_tizen 2.3
- * @param[in] callback The callback function to register
- * @param[in] user_data The user data to be passed to the callback function
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/bluetooth.admin
+ * @param[in] mode The repeat mode
* @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_REMOTE_DEVICE_NOT_CONNECTED Remote device is not connected
+ * @retval #BT_ERROR_PERMISSION_DENIED Permission denied
* @retval #BT_ERROR_NOT_SUPPORTED Not supported
*
- * @pre The Bluetooth audio service must be initialized with bt_audio_initialize().
- * @see bt_audio_initialize()
- * @see bt_ag_call_handling_event_cb()
- * @see bt_ag_unset_call_handling_event_cb()
- */
-int bt_ag_set_call_handling_event_cb(bt_ag_call_handling_event_cb callback, void *user_data);
-
-/**
- * @internal
- * @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_AG_MODULE
- * @brief Unregisters a callback function that will be invoked when a call handling event happened from Hands-Free.
- * @since_tizen 2.3
- * @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 audio service must be initialized with bt_audio_initialize().
- * @see bt_audio_initialize()
- * @see bt_ag_call_handling_event_cb()
- * @see bt_ag_set_call_handling_event_cb()
+ * @pre The remote device must be connected.
+ * @see bt_avrcp_target_connection_state_changed_cb()
+ * @see bt_avrcp_target_initialize()
*/
-int bt_ag_unset_call_handling_event_cb(void);
+int bt_avrcp_target_notify_repeat_mode(bt_avrcp_repeat_mode_e mode);
/**
* @internal
- * @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_AG_MODULE
- * @brief Registers a callback function that will be invoked when a multi call handling event happened from Hands-Free.
+ * @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_MODULE
+ * @brief Notifies the shuffle mode to the remote device.
* @since_tizen 2.3
- * @param[in] callback The callback function to register
- * @param[in] user_data The user data to be passed to the callback function
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/bluetooth.admin
+ * @param[in] mode The repeat mode
* @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_REMOTE_DEVICE_NOT_CONNECTED Remote device is not connected
+ * @retval #BT_ERROR_PERMISSION_DENIED Permission denied
* @retval #BT_ERROR_NOT_SUPPORTED Not supported
*
- * @pre The Bluetooth audio service must be initialized with bt_audio_initialize().
- * @see bt_audio_initialize()
- * @see bt_ag_multi_call_handling_event_cb()
- * @see bt_ag_unset_multi_call_handling_event_cb()
- */
-int bt_ag_set_multi_call_handling_event_cb(bt_ag_multi_call_handling_event_cb callback, void *user_data);
-
-/**
- * @internal
- * @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_AG_MODULE
- * @brief Unregisters a callback function that will be invoked when a multi call handling event happened from Hands-Free.
- * @since_tizen 2.3
- * @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 audio service must be initialized with bt_audio_initialize().
- * @see bt_audio_initialize()
- * @see bt_ag_multi_call_handling_event_cb()
- * @see bt_ag_set_multi_call_handling_event_cb()
+ * @pre The remote device must be connected.
+ * @see bt_avrcp_target_connection_state_changed_cb()
+ * @see bt_avrcp_target_initialize()
*/
-int bt_ag_unset_multi_call_handling_event_cb(void);
+int bt_avrcp_target_notify_shuffle_mode(bt_avrcp_shuffle_mode_e mode);
/**
* @internal
- * @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_AG_MODULE
- * @brief Registers a callback function that will be invoked when a DTMF(Dual Tone Multi Frequency) is transmitted from Hands-Free.
+ * @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_MODULE
+ * @brief Notifies the scan mode to the remote device.
* @since_tizen 2.3
- * @param[in] callback The callback function to register
- * @param[in] user_data The user data to be passed to the callback function
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/bluetooth.admin
+ * @param[in] mode The scan mode
* @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_REMOTE_DEVICE_NOT_CONNECTED Remote device is not connected
+ * @retval #BT_ERROR_PERMISSION_DENIED Permission denied
* @retval #BT_ERROR_NOT_SUPPORTED Not supported
*
- * @pre The Bluetooth audio service must be initialized with bt_audio_initialize().
- * @see bt_audio_initialize()
- * @see bt_ag_dtmf_transmitted_cb()
- * @see bt_ag_unset_dtmf_transmitted_cb()
- */
-int bt_ag_set_dtmf_transmitted_cb(bt_ag_dtmf_transmitted_cb callback, void *user_data);
-
-/**
- * @internal
- * @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_AG_MODULE
- * @brief Unregisters a callback function that will be invoked when a DTMF(Dual Tone Multi Frequency) is transmitted from Hands-Free.
- * @since_tizen 2.3
- * @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 audio service must be initialized with bt_audio_initialize().
- * @see bt_audio_initialize()
- * @see bt_ag_dtmf_transmitted_cb()
- * @see bt_ag_set_dtmf_transmitted_cb()
+ * @pre The remote device must be connected.
+ * @see bt_avrcp_target_connection_state_changed_cb()
+ * @see bt_avrcp_target_initialize()
*/
-int bt_ag_unset_dtmf_transmitted_cb(void);
+int bt_avrcp_target_notify_scan_mode(bt_avrcp_scan_mode_e mode);
/**
* @internal
- * @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_AG_MODULE
- * @brief Notifies the speaker gain to the remote device.
+ * @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_MODULE
+ * @brief Notifies the player state to the remote device.
* @since_tizen 2.3
* @privlevel platform
* @privilege %http://tizen.org/privilege/bluetooth.admin
- * @details This function sends a signal to the remote device. This signal has the gain value.
- * @a gain is represented on a scale from 0 to 15. This value is absolute value relating to a particular volume level.
- * When the speaker gain of remote device is changed to the requested gain, bt_audio_speaker_gain_changed_cb() will be called.
- * @param[in] gain The gain of speaker (0 ~ 15)
+ * @param[in] state The player state
* @return 0 on success, otherwise a negative error value.
* @retval #BT_ERROR_NONE Successful
* @retval #BT_ERROR_NOT_INITIALIZED Not initialized
* @retval #BT_ERROR_PERMISSION_DENIED Permission denied
* @retval #BT_ERROR_NOT_SUPPORTED Not supported
*
- * @pre The remote device is connected by bt_audio_connect() with #BT_AUDIO_PROFILE_TYPE_HSP_HFP service.
- * @see bt_ag_get_speaker_gain()
- * @see bt_ag_set_speaker_gain_changed_cb()
- * @see bt_ag_unset_speaker_gain_changed_cb()
+ * @pre The remote device must be connected.
+ * @see bt_avrcp_target_connection_state_changed_cb()
+ * @see bt_avrcp_target_initialize()
*/
-int bt_ag_notify_speaker_gain(int gain);
+int bt_avrcp_target_notify_player_state(bt_avrcp_player_state_e state);
/**
* @internal
- * @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_AG_MODULE
- * @brief Gets the current speaker gain of the remote device.
+ * @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_MODULE
+ * @brief Notifies the current position of song to the remote device.
* @since_tizen 2.3
- * @details This function gets the value of speaker gain of the remote device.
- * @a gain is represented on a scale from 0 to 15. This value is absolute value relating to a particular volume level.
- * @param[out] gain The gain of speaker (0 ~ 15)
- * @return 0 on success, otherwise a negative error value.
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/bluetooth.admin
+ * @param[in] position The current position in milliseconds
+ * @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_REMOTE_DEVICE_NOT_CONNECTED Remote device is not connected
+ * @retval #BT_ERROR_PERMISSION_DENIED Permission denied
* @retval #BT_ERROR_NOT_SUPPORTED Not supported
*
- * @pre The remote device is connected by bt_audio_connect() with #BT_AUDIO_PROFILE_TYPE_HSP_HFP service.
- * @see bt_ag_notify_speaker_gain()
- * @see bt_ag_set_speaker_gain_changed_cb()
- * @see bt_ag_unset_speaker_gain_changed_cb()
+ * @pre The remote device must be connected.
+ * @see bt_avrcp_target_connection_state_changed_cb()
+ * @see bt_avrcp_target_initialize()
*/
-int bt_ag_get_speaker_gain(int *gain);
+int bt_avrcp_target_notify_position(unsigned int position);
/**
* @internal
- * @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_AG_MODULE
- * @brief Checks whether the remoted device enables NREC(Noise Reduction and Echo Canceling) or not.
+ * @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_MODULE
+ * @brief Notifies the track to the remote device.
* @since_tizen 2.3
- * @param[out] enabled The NREC status: (@c true = enabled, @c false = not enabled)
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/bluetooth.admin
+ * @param[in] title The title of track
+ * @param[in] artist The artist of track
+ * @param[in] album The album of track
+ * @param[in] genre The genre of track
+ * @param[in] track_num The track number
+ * @param[in] total_tracks The number of all tracks
+ * @param[in] duration The duration of track in milliseconds
* @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_REMOTE_DEVICE_NOT_CONNECTED Remote device is not connected
+ * @retval #BT_ERROR_PERMISSION_DENIED Permission denied
* @retval #BT_ERROR_NOT_SUPPORTED Not supported
*
- * @pre The remote device is connected by bt_audio_connect() with #BT_AUDIO_PROFILE_TYPE_HSP_HFP service.
- * @see bt_audio_connect()
+ * @pre The remote device must be connected.
+ * @see bt_avrcp_target_connection_state_changed_cb()
+ * @see bt_avrcp_target_initialize()
*/
-int bt_ag_is_nrec_enabled(bool *enabled);
+int bt_avrcp_target_notify_track(const char *title, const char *artist, const char *album, const char *genre, unsigned int track_num, unsigned int total_tracks, unsigned int duration);
/**
* @internal
- * @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_AG_MODULE
- * @brief Registers a callback function that will be invoked when the speaker gain of the remote device is changed.
+ * @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_MODULE
+ * @brief Registers a callback function that will be invoked when the equalizer state is changed by the remote control device.
* @since_tizen 2.3
- * @details This function let you know the change of the speaker gain of the remote device.
- * @a gain is represented on a scale from 0 to 15. This value is absolute value relating to a particular volume level.
* @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_INVALID_PARAMETER Invalid parameter
* @retval #BT_ERROR_NOT_SUPPORTED Not supported
*
- * @pre The Bluetooth audio service must be initialized with bt_audio_initialize().
- * @see bt_audio_initialize()
- * @see bt_ag_unset_speaker_gain_changed_cb()
+ * @pre The Bluetooth service must be initialized by bt_initialize().
+ * @see bt_initialize()
+ * @see bt_avrcp_unset_equalizer_state_changed_cb()
*/
-int bt_ag_set_speaker_gain_changed_cb(bt_ag_speaker_gain_changed_cb callback, void *user_data);
+int bt_avrcp_set_equalizer_state_changed_cb(bt_avrcp_equalizer_state_changed_cb callback, void *user_data);
/**
* @internal
- * @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_AG_MODULE
- * @brief Unregisters a callback function that will be invoked when the speaker gain of the remote device is changed.
+ * @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_MODULE
+ * @brief Unregisters a callback function that will be invoked when the equalizer state is changed by the remote control device.
* @since_tizen 2.3
* @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 audio service must be initialized with bt_audio_initialize().
- * @see bt_audio_initialize()
- * @see bt_ag_set_speaker_gain_changed_cb()
+ * @pre The Bluetooth service must be initialized by bt_initialize().
+ * @see bt_initialize()
+ * @see bt_avrcp_set_equalizer_state_changed_cb()
*/
-int bt_ag_unset_speaker_gain_changed_cb(void);
+int bt_avrcp_unset_equalizer_state_changed_cb(void);
/**
* @internal
- * @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_AG_MODULE
- * @brief Registers a callback function that will be invoked when the microphone gain of the remote device is changed.
+ * @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_MODULE
+ * @brief Registers a callback function that will be invoked when the repeat mode is changed by the remote control device.
* @since_tizen 2.3
* @param[in] callback The callback function to register
* @param[in] user_data The user data to be passed to the callback function
* @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #BT_ERROR_NOT_SUPPORTED Not supported
*
- * @pre The Bluetooth audio service must be initialized with bt_audio_initialize().
- * @see bt_audio_initialize()
- * @see bt_ag_unset_microphone_gain_changed_cb()
+ * @pre The Bluetooth service must be initialized by bt_initialize().
+ * @see bt_initialize()
+ * @see bt_avrcp_unset_repeat_mode_changed_cb()
*/
-int bt_ag_set_microphone_gain_changed_cb(bt_ag_microphone_gain_changed_cb callback, void *user_data);
+int bt_avrcp_set_repeat_mode_changed_cb(bt_avrcp_repeat_mode_changed_cb callback, void *user_data);
/**
* @internal
- * @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_AG_MODULE
- * @brief Unregisters a callback function that will be invoked when the microphone gain of the remote device is changed.
+ * @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_MODULE
+ * @brief Unregisters a callback function that will be invoked when the repeat mode is changed by the remote control device.
* @since_tizen 2.3
* @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 audio service must be initialized with bt_audio_initialize().
- * @see bt_audio_initialize()
- * @see bt_ag_set_microphone_gain_changed_cb()
+ * @pre The Bluetooth service must be initialized by bt_initialize().
+ * @see bt_initialize()
+ * @see bt_avrcp_set_repeat_mode_changed_cb()
*/
-int bt_ag_unset_microphone_gain_changed_cb(void);
+int bt_avrcp_unset_repeat_mode_changed_cb(void);
/**
* @internal
- * @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_AG_CALL_MODULE
- * @brief Creates a handle of call list.
+ * @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_MODULE
+ * @brief Registers a callback function that will be invoked when the shuffle mode is changed by the remote control device.
* @since_tizen 2.3
- * @param[out] list The handle of call list
- * @return 0 on success, otherwise a negative error value.
+ * @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_OUT_OF_MEMORY Out of memory
- * @retval #BT_ERROR_PERMISSION_DENIED Permission denied
* @retval #BT_ERROR_NOT_SUPPORTED Not supported
*
- * @see bt_call_list_destroy()
+ * @pre The Bluetooth service must be initialized by bt_initialize().
+ * @see bt_initialize()
+ * @see bt_avrcp_unset_shuffle_mode_changed_cb()
*/
-int bt_call_list_create(bt_call_list_h *list);
+int bt_avrcp_set_shuffle_mode_changed_cb(bt_avrcp_shuffle_mode_changed_cb callback, void *user_data);
/**
* @internal
- * @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_AG_CALL_MODULE
- * @brief Destroys the handle of call list.
+ * @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_MODULE
+ * @brief Unregisters a callback function that will be invoked when the shuffle mode is changed by the remote control device.
* @since_tizen 2.3
- * @param[in] list The handle of call list
- * @return 0 on success, otherwise a negative error value.
+ * @return 0 on success, otherwise a negative error value.
* @retval #BT_ERROR_NONE Successful
- * @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #BT_ERROR_NOT_INITIALIZED Not initialized
* @retval #BT_ERROR_NOT_SUPPORTED Not supported
*
- * @see bt_call_list_create()
+ * @pre The Bluetooth service must be initialized by bt_initialize().
+ * @see bt_initialize()
+ * @see bt_avrcp_set_shuffle_mode_changed_cb()
*/
-int bt_call_list_destroy(bt_call_list_h list);
+int bt_avrcp_unset_shuffle_mode_changed_cb(void);
/**
* @internal
- * @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_AG_CALL_MODULE
- * @brief Resets the handle of call list.
+ * @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_MODULE
+ * @brief Registers a callback function that will be invoked when the scan mode is changed by the remote control device.
* @since_tizen 2.3
- * @param[in] list The handle of call list
- * @return 0 on success, otherwise a negative error value.
+ * @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
*
- * @see bt_call_list_create()
+ * @pre The Bluetooth service must be initialized by bt_initialize().
+ * @see bt_initialize()
+ * @see bt_avrcp_unset_scan_mode_changed_cb()
*/
-int bt_call_list_reset(bt_call_list_h list);
+int bt_avrcp_set_scan_mode_changed_cb(bt_avrcp_scan_mode_changed_cb callback, void *user_data);
/**
* @internal
- * @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_AG_CALL_MODULE
- * @brief Adds a call to the handle of call list.
+ * @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_MODULE
+ * @brief Unregisters a callback function that will be invoked when the scan mode is changed by the remote control device.
* @since_tizen 2.3
- * @param[in] list The handle of call list
- * @param[in] call_id The call ID
- * @param[in] state The state of audio gate call
- * @param[in] phone_number The phone number. You must set this value in case of #BT_AG_CALL_EVENT_DIALING and #BT_AG_CALL_EVENT_INCOMING.
- * @return 0 on success, otherwise a negative error value.
+ * @return 0 on success, otherwise a negative error value.
* @retval #BT_ERROR_NONE Successful
- * @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #BT_ERROR_OUT_OF_MEMORY Out of memory
+ * @retval #BT_ERROR_NOT_INITIALIZED Not initialized
* @retval #BT_ERROR_NOT_SUPPORTED Not supported
*
- * @see bt_call_list_create()
+ * @pre The Bluetooth service must be initialized by bt_initialize().
+ * @see bt_initialize()
+ * @see bt_avrcp_set_scan_mode_changed_cb()
*/
-int bt_call_list_add(bt_call_list_h list, unsigned int call_id, bt_ag_call_state_e state, const char *phone_number);
+int bt_avrcp_unset_scan_mode_changed_cb(void);
+
/**
- * @internal
* @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_MODULE
* @brief Initializes the Bluetooth AVRCP(Audio/Video Remote Control Profile) service.
- * @since_tizen 2.3
+ * @since_tizen 2.4
* @remarks This function must be called before Bluetooth AVRCP service. \n
* You must free all resources of the this service by calling bt_avrcp_target_deinitialize()
* if Bluetooth AVRCP service is no longer needed.
int bt_avrcp_target_initialize(bt_avrcp_target_connection_state_changed_cb callback, void *user_data);
/**
- * @internal
* @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_MODULE
* @brief Deinitializes the Bluetooth AVRCP(Audio/Video Remote Control Profile) service.
- * @since_tizen 2.3
+ * @since_tizen 2.4
* @return 0 on success, otherwise a negative error value.
* @retval #BT_ERROR_NONE Successful
* @retval #BT_ERROR_NOT_INITIALIZED Not initialized
int bt_avrcp_target_deinitialize(void);
/**
- * @internal
* @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_MODULE
* @brief Notifies the equalize state to the remote device.
- * @since_tizen 2.3
+ * @since_tizen 2.4
* @privlevel platform
* @privilege %http://tizen.org/privilege/bluetooth.admin
* @param[in] state The state of equalizer
int bt_avrcp_target_notify_equalizer_state(bt_avrcp_equalizer_state_e state);
/**
- * @internal
* @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_MODULE
* @brief Notifies the repeat mode to the remote device.
- * @since_tizen 2.3
+ * @since_tizen 2.4
* @privlevel platform
* @privilege %http://tizen.org/privilege/bluetooth.admin
* @param[in] mode The repeat mode
int bt_avrcp_target_notify_repeat_mode(bt_avrcp_repeat_mode_e mode);
/**
- * @internal
* @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_MODULE
* @brief Notifies the shuffle mode to the remote device.
- * @since_tizen 2.3
+ * @since_tizen 2.4
* @privlevel platform
* @privilege %http://tizen.org/privilege/bluetooth.admin
* @param[in] mode The repeat mode
int bt_avrcp_target_notify_shuffle_mode(bt_avrcp_shuffle_mode_e mode);
/**
- * @internal
* @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_MODULE
* @brief Notifies the scan mode to the remote device.
- * @since_tizen 2.3
+ * @since_tizen 2.4
* @privlevel platform
* @privilege %http://tizen.org/privilege/bluetooth.admin
* @param[in] mode The scan mode
int bt_avrcp_target_notify_scan_mode(bt_avrcp_scan_mode_e mode);
/**
- * @internal
* @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_MODULE
* @brief Notifies the player state to the remote device.
- * @since_tizen 2.3
+ * @since_tizen 2.4
* @privlevel platform
* @privilege %http://tizen.org/privilege/bluetooth.admin
* @param[in] state The player state
int bt_avrcp_target_notify_player_state(bt_avrcp_player_state_e state);
/**
- * @internal
* @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_MODULE
* @brief Notifies the current position of song to the remote device.
- * @since_tizen 2.3
+ * @since_tizen 2.4
* @privlevel platform
* @privilege %http://tizen.org/privilege/bluetooth.admin
* @param[in] position The current position in milliseconds
int bt_avrcp_target_notify_position(unsigned int position);
/**
- * @internal
* @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_MODULE
* @brief Notifies the track to the remote device.
- * @since_tizen 2.3
+ * @since_tizen 2.4
* @privlevel platform
* @privilege %http://tizen.org/privilege/bluetooth.admin
* @param[in] title The title of track
int bt_avrcp_target_notify_track(const char *title, const char *artist, const char *album, const char *genre, unsigned int track_num, unsigned int total_tracks, unsigned int duration);
/**
- * @internal
* @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_MODULE
* @brief Registers a callback function that will be invoked when the equalizer state is changed by the remote control device.
- * @since_tizen 2.3
+ * @since_tizen 2.4
* @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.
int bt_avrcp_set_equalizer_state_changed_cb(bt_avrcp_equalizer_state_changed_cb callback, void *user_data);
/**
- * @internal
* @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_MODULE
* @brief Unregisters a callback function that will be invoked when the equalizer state is changed by the remote control device.
- * @since_tizen 2.3
+ * @since_tizen 2.4
* @return 0 on success, otherwise a negative error value.
* @retval #BT_ERROR_NONE Successful
* @retval #BT_ERROR_NOT_INITIALIZED Not initialized
int bt_avrcp_unset_equalizer_state_changed_cb(void);
/**
- * @internal
* @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_MODULE
* @brief Registers a callback function that will be invoked when the repeat mode is changed by the remote control device.
- * @since_tizen 2.3
+ * @since_tizen 2.4
* @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.
int bt_avrcp_set_repeat_mode_changed_cb(bt_avrcp_repeat_mode_changed_cb callback, void *user_data);
/**
- * @internal
* @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_MODULE
* @brief Unregisters a callback function that will be invoked when the repeat mode is changed by the remote control device.
- * @since_tizen 2.3
+ * @since_tizen 2.4
* @return 0 on success, otherwise a negative error value.
* @retval #BT_ERROR_NONE Successful
* @retval #BT_ERROR_NOT_INITIALIZED Not initialized
int bt_avrcp_unset_repeat_mode_changed_cb(void);
/**
- * @internal
* @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_MODULE
* @brief Registers a callback function that will be invoked when the shuffle mode is changed by the remote control device.
- * @since_tizen 2.3
+ * @since_tizen 2.4
* @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.
int bt_avrcp_set_shuffle_mode_changed_cb(bt_avrcp_shuffle_mode_changed_cb callback, void *user_data);
/**
- * @internal
* @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_MODULE
* @brief Unregisters a callback function that will be invoked when the shuffle mode is changed by the remote control device.
- * @since_tizen 2.3
+ * @since_tizen 2.4
* @return 0 on success, otherwise a negative error value.
* @retval #BT_ERROR_NONE Successful
* @retval #BT_ERROR_NOT_INITIALIZED Not initialized
int bt_avrcp_unset_shuffle_mode_changed_cb(void);
/**
- * @internal
* @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_MODULE
* @brief Registers a callback function that will be invoked when the scan mode is changed by the remote control device.
- * @since_tizen 2.3
+ * @since_tizen 2.4
* @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.
int bt_avrcp_set_scan_mode_changed_cb(bt_avrcp_scan_mode_changed_cb callback, void *user_data);
/**
- * @internal
* @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_MODULE
* @brief Unregisters a callback function that will be invoked when the scan mode is changed by the remote control device.
- * @since_tizen 2.3
+ * @since_tizen 2.4
* @return 0 on success, otherwise a negative error value.
* @retval #BT_ERROR_NONE Successful
* @retval #BT_ERROR_NOT_INITIALIZED Not initialized
*/
int bt_gatt_unset_connection_state_changed_cb(void);
-/**
- * @internal
- * @ingroup CAPI_NETWORK_BLUETOOTH_PAN_NAP_MODULE
- * @brief Activates the NAP(Network Access Point).
- * @since_tizen 2.3
- * @privlevel public
- * @privilege %http://tizen.org/privilege/bluetooth
- * @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_OPERATION_FAILED Operation failed
- * @retval #BT_ERROR_ALREADY_DONE Operation is already done
- * @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
- * @see bt_nap_deactivate()
- */
-int bt_nap_activate(void);
-
-/**
- * @internal
- * @ingroup CAPI_NETWORK_BLUETOOTH_PAN_NAP_MODULE
- * @brief Deactivates the NAP(Network Access Point).
- * @since_tizen 2.3
- * @privlevel public
- * @privilege %http://tizen.org/privilege/bluetooth
- * @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_OPERATION_FAILED Operation failed
- * @retval #BT_ERROR_ALREADY_DONE Operation is already done
- * @retval #BT_ERROR_PERMISSION_DENIED Permission denied
- * @retval #BT_ERROR_NOT_SUPPORTED Not supported
- *
- * @pre The Bluetooth NAP service must be activated with bt_nap_activate().
- * @see bt_nap_activate()
- */
-int bt_nap_deactivate(void);
-
-/**
- * @internal
- * @ingroup CAPI_NETWORK_BLUETOOTH_PAN_NAP_MODULE
- * @brief Disconnects the all PANUs(Personal Area Networking User) which are connected to you.
- * @since_tizen 2.3
- * @privlevel public
- * @privilege %http://tizen.org/privilege/bluetooth
- * @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_OPERATION_FAILED Operation failed
- * @retval #BT_ERROR_PERMISSION_DENIED Permission denied
- * @retval #BT_ERROR_NOT_SUPPORTED Not supported
- *
- * @pre The Bluetooth NAP service must be activated with bt_nap_activate().
- * @see bt_nap_activate()
- */
-int bt_nap_disconnect_all(void);
-
-/**
- * @internal
- * @ingroup CAPI_NETWORK_BLUETOOTH_PAN_NAP_MODULE
- * @brief Disconnects the specified PANU(Personal Area Networking User) which is connected to you.
- * @since_tizen 2.3
- * @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_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
- *
- * @pre The Bluetooth NAP service must be activated with bt_nap_activate().
- * @see bt_nap_activate()
- */
-int bt_nap_disconnect(const char *remote_address);
-
-/**
- * @internal
- * @ingroup CAPI_NETWORK_BLUETOOTH_PAN_NAP_MODULE
- * @brief Registers a callback function that will be invoked when the connection state changes.
- * @since_tizen 2.3
- * @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().
- * @post bt_nap_connection_state_changed_cb() will be invoked.
- * @see bt_initialize()
- * @see bt_nap_connection_state_changed_cb()
- * @see bt_nap_unset_connection_state_changed_cb()
- */
-int bt_nap_set_connection_state_changed_cb(bt_nap_connection_state_changed_cb callback, void *user_data);
-
-/**
- * @internal
- * @ingroup CAPI_NETWORK_BLUETOOTH_PAN_NAP_MODULE
- * @brief Unregisters a callback function that will be invoked when the connection state changes.
- * @since_tizen 2.3
- * @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().
- * @post bt_nap_connection_state_changed_cb() will be invoked.
- * @see bt_initialize()
- * @see bt_nap_connection_state_changed_cb()
- * @see bt_nap_set_connection_state_changed_cb()
- */
-int bt_nap_unset_connection_state_changed_cb(void);
-
-/**
- * @internal
- * @ingroup CAPI_NETWORK_BLUETOOTH_PAN_PANU_MODULE
- * @brief Registers a callback function that will be invoked when the connection state changes.
- * @since_tizen 2.3
- * @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().
- * @post bt_nap_connection_state_changed_cb() will be invoked.
- * @see bt_initialize()
- * @see bt_panu_connection_state_changed_cb()
- * @see bt_panu_unset_connection_state_changed_cb()
- */
-int bt_panu_set_connection_state_changed_cb(bt_panu_connection_state_changed_cb callback, void *user_data);
-
-/**
- * @internal
- * @ingroup CAPI_NETWORK_BLUETOOTH_PAN_PANU_MODULE
- * @brief Unregisters a callback function that will be invoked when the connection state changes.
- * @since_tizen 2.3
- * @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().
- * @post bt_nap_connection_state_changed_cb() will be invoked.
- * @see bt_initialize()
- * @see bt_panu_connection_state_changed_cb()
- * @see bt_panu_set_connection_state_changed_cb()
- */
-int bt_panu_unset_connection_state_changed_cb(void);
-
-/**
- * @internal
- * @ingroup CAPI_NETWORK_BLUETOOTH_PAN_PANU_MODULE
- * @brief Connects the remote device with the PAN(Personal Area Networking) service, asynchronously.
- * @since_tizen 2.3
- * @privlevel public
- * @privilege %http://tizen.org/privilege/bluetooth
- * @param[in] remote_address The remote address
- * @param[in] type The type of PAN service
- * @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_BONDED Remote device is not bonded
- * @retval #BT_ERROR_OUT_OF_MEMORY Out of memory
- * @retval #BT_ERROR_OPERATION_FAILED Operation failed
- * @retval #BT_ERROR_PERMISSION_DENIED Permission denied
- * @retval #BT_ERROR_NOT_SUPPORTED Not supported
- *
- * @pre The local device must be bonded with the remote device by bt_device_create_bond().
- * @post bt_panu_connection_state_changed_cb() will be invoked.
- * @see bt_panu_disconnect()
- * @see bt_panu_connection_state_changed_cb()
- */
-int bt_panu_connect(const char *remote_address, bt_panu_service_type_e type);
-
-/**
- * @internal
- * @ingroup CAPI_NETWORK_BLUETOOTH_PAN_PANU_MODULE
- * @brief Disconnects the remote device with the PAN(Personal Area Networking) service, asynchronously.
- * @since_tizen 2.3
- * @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_OUT_OF_MEMORY Out of memory
- * @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_panu_connect().
- * @post bt_panu_connection_state_changed_cb() will be invoked.
- * @see bt_panu_connect()
- * @see bt_panu_connection_state_changed_cb()
- */
-int bt_panu_disconnect(const char *remote_address);
-
-/**
- * @internal
- * @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE
- * @brief update LE connection.
- * @since_tizen 2.3
- * @privlevel platform
- * @privilege %http://tizen.org/privilege/bluetooth.admin
- * @return 0 on success, otherwise a negative error value.
- * @retval #BT_ERROR_NONE Successful
- * @retval #BT_ERROR_NOT_INITIALIZED Not initialized
- * @retval #BT_ERROR_PERMISSION_DENIED Permission denied
- * @retval #BT_ERROR_NOT_SUPPORTED Not supported
- *
- * @pre The Bluetooth service must be initialized by bt_initialize().
- * @pre The remote device must be connected with bt_gatt_connect().
- */
-int bt_device_le_conn_update(const char *device_address,
- const bt_le_conn_update_s *parameters);
-
-
/**
* @}
*/
--- /dev/null
+/*\r
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the License);\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an AS IS BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#ifndef __TIZEN_NETWORK_BLUETOOTH_INTERNAL_H__\r
+#define __TIZEN_NETWORK_BLUETOOTH_INTERNAL_H__\r
+\r
+#include <glib.h>\r
+#include "bluetooth_type.h"\r
+\r
+#ifdef __cplusplus\r
+extern "C"\r
+{\r
+#endif /* __cplusplus */\r
+\r
+/**\r
+ * @file bluetooth_internal.h\r
+ */\r
+\r
+/**\r
+ * @internal\r
+ * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE\r
+ * @brief Enables the local Bluetooth adapter, asynchronously.\r
+ * @since_tizen 2.3\r
+ * @privlevel platform\r
+ * @privilege %http://tizen.org/privilege/bluetooth.admin\r
+ *\r
+ * @details This function enables Bluetooth protocol stack and hardware.\r
+ *\r
+ * @return 0 on success, otherwise a negative error value.\r
+ * @retval #BT_ERROR_NONE Successful\r
+ * @retval #BT_ERROR_NOT_INITIALIZED Not initialized\r
+ * @retval #BT_ERROR_ALREADY_DONE Already enabled\r
+ * @retval #BT_ERROR_NOW_IN_PROGRESS Operation now in progress\r
+ * @retval #BT_ERROR_PERMISSION_DENIED Permission denied\r
+ * @retval #BT_ERROR_NOT_SUPPORTED Not supported\r
+ *\r
+ * @pre Bluetooth service must be initialized with bt_initialize().\r
+ * @pre The state of local Bluetooth must be #BT_ADAPTER_DISABLED\r
+ * @post This function invokes bt_adapter_state_changed_cb().\r
+ *\r
+ * @see bt_initialize()\r
+ * @see bt_adapter_get_state()\r
+ * @see bt_adapter_set_state_changed_cb()\r
+ * @see bt_adapter_unset_state_changed_cb()\r
+ * @see bt_adapter_state_changed_cb()\r
+ *\r
+ */\r
+int bt_adapter_enable(void);\r
+\r
+/**\r
+ * @internal\r
+ * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE\r
+ * @brief Disables the local Bluetooth adapter, asynchronously.\r
+ * @since_tizen 2.3\r
+ * @privlevel platform\r
+ * @privilege %http://tizen.org/privilege/bluetooth.admin\r
+ *\r
+ * @details This function disables Bluetooth protocol stack and hardware.\r
+ *\r
+ * @remarks You should disable Bluetooth adapter, which is helpful for saving power.\r
+ *\r
+ * @return 0 on success, otherwise a negative error value.\r
+ * @retval #BT_ERROR_NONE Successful\r
+ * @retval #BT_ERROR_NOT_INITIALIZED Not initialized\r
+ * @retval #BT_ERROR_NOT_ENABLED Not enabled\r
+ * @retval #BT_ERROR_NOW_IN_PROGRESS Operation now in progress\r
+ * @retval #BT_ERROR_PERMISSION_DENIED Permission denied\r
+ * @retval #BT_ERROR_NOT_SUPPORTED Not supported\r
+ *\r
+ * @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED\r
+ * @post This function invokes bt_adapter_state_changed_cb().\r
+ *\r
+ * @see bt_adapter_get_state()\r
+ * @see bt_adapter_state_changed_cb()\r
+ * @see bt_adapter_set_state_changed_cb()\r
+ * @see bt_adapter_unset_state_changed_cb ()\r
+ *\r
+ */\r
+int bt_adapter_disable(void);\r
+\r
+/**\r
+ * @internal\r
+ * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE\r
+ * @brief Recover the local Bluetooth adapter, asynchronously.\r
+ * @since_tizen 2.3\r
+ * @privlevel platform\r
+ * @privilege %http://tizen.org/privilege/bluetooth.admin\r
+ *\r
+ * @details This function does recovery logic, disables Bluetooth protocol stack and hardware, then enables after a few seconds.\r
+ *\r
+ * @return 0 on success, otherwise a negative error value.\r
+ * @retval #BT_ERROR_NONE Successful\r
+ * @retval #BT_ERROR_NOT_INITIALIZED Not initialized\r
+ * @retval #BT_ERROR_NOT_ENABLED Not enabled\r
+ * @retval #BT_ERROR_NOW_IN_PROGRESS Operation now in progress\r
+ * @retval #BT_ERROR_PERMISSION_DENIED Permission denied\r
+ * @retval #BT_ERROR_NOT_SUPPORTED Not supported\r
+ *\r
+ * @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED\r
+ * @post This function invokes bt_adapter_state_changed_cb().\r
+ *\r
+ * @see bt_adapter_get_state()\r
+ * @see bt_adapter_state_changed_cb()\r
+ * @see bt_adapter_set_state_changed_cb()\r
+ * @see bt_adapter_unset_state_changed_cb ()\r
+ *\r
+ */\r
+int bt_adapter_recover(void);\r
+\r
+/**\r
+ * @internal\r
+ * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE\r
+ * @brief Reset the local Bluetooth adapter, synchronously.\r
+ * @since_tizen 2.3\r
+ * @privlevel platform\r
+ * @privilege %http://tizen.org/privilege/bluetooth.admin\r
+ *\r
+ * @details This function resets Bluetooth protocol and values.\r
+ *\r
+ * @return 0 on success, otherwise a negative error value.\r
+ * @retval #BT_ERROR_NONE Successful\r
+ * @retval #BT_ERROR_NOT_INITIALIZED Not initialized\r
+ * @retval #BT_ERROR_OPERATION_FAILED Operation failed\r
+ * @retval #BT_ERROR_PERMISSION_DENIED Permission denied\r
+ * @retval #BT_ERROR_NOT_SUPPORTED Not supported\r
+ *\r
+ * @pre Bluetooth service must be initialized with bt_initialize().\r
+ * @post bt_adapter_state_changed_cb() will be invoked if The state of local Bluetooth was #BT_ADAPTER_ENABLED.\r
+ *\r
+ * @see bt_initialize()\r
+ * @see bt_adapter_get_state()\r
+ * @see bt_adapter_set_state_changed_cb()\r
+ * @see bt_adapter_unset_state_changed_cb()\r
+ * @see bt_adapter_state_changed_cb()\r
+ *\r
+ */\r
+int bt_adapter_reset(void);\r
+\r
+/**\r
+ * @internal\r
+ * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE\r
+ * @brief Gets the version of local Bluetooth adapter.\r
+ * @since_tizen 2.3\r
+ * @remarks The @a local_version must be released with free() by you.\r
+ *\r
+ * @param[out] local_version The version of local Bluetooth adapter\r
+ *\r
+ * @return 0 on success, otherwise a negative error value.\r
+ * @retval #BT_ERROR_NONE Successful\r
+ * @retval #BT_ERROR_NOT_INITIALIZED Not initialized\r
+ * @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter\r
+ * @retval #BT_ERROR_NOT_ENABLED Not enabled\r
+ * @retval #BT_ERROR_OUT_OF_MEMORY Out of memory\r
+ * @retval #BT_ERROR_OPERATION_FAILED Operation failed\r
+ * @retval #BT_ERROR_NOT_SUPPORTED Not supported\r
+ *\r
+ * @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED.\r
+ */\r
+int bt_adapter_get_version(char **local_version);\r
+\r
+/**\r
+ * @internal\r
+ * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE\r
+ * @brief Gets the information regarding local Bluetooth adapter.\r
+ * @since_tizen 2.3\r
+ * @remarks The @a all parameters must be released with free() by you.\r
+ *\r
+ * @param[out] chipset Chipset name of local Bluetooth adapter\r
+ * @param[out] firmware Firmware info. of local Bluetooth adapter\r
+ * @param[out] stack_version Bluetooth stack version\r
+ * @param[out] profiles The profile list of local Bluetooth adapter\r
+ *\r
+ * @return 0 on success, otherwise a negative error value.\r
+ * @retval #BT_ERROR_NONE Successful\r
+ * @retval #BT_ERROR_NOT_INITIALIZED Not initialized\r
+ * @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter\r
+ * @retval #BT_ERROR_NOT_ENABLED Not enabled\r
+ * @retval #BT_ERROR_OUT_OF_MEMORY Out of memory\r
+ * @retval #BT_ERROR_OPERATION_FAILED Operation failed\r
+ * @retval #BT_ERROR_NOT_SUPPORTED Not supported\r
+ *\r
+ * @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED.\r
+ */\r
+int bt_adapter_get_local_info(char **chipset, char **firmware, char **stack_version, char **profiles);\r
+\r
+/**\r
+ * @internal\r
+ * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE\r
+ * @brief Sets the visibility mode.\r
+ * @since_tizen 2.3\r
+ * @privlevel platform\r
+ * @privilege %http://tizen.org/privilege/bluetooth.admin\r
+ *\r
+ * @remarks #BT_ADAPTER_VISIBILITY_MODE_LIMITED_DISCOVERABLE will change to #BT_ADAPTER_VISIBILITY_MODE_NON_DISCOVERABLE\r
+ * after the given @a duration goes.\r
+ *\r
+ * @param[in] discoverable_mode The Bluetooth visibility mode to set\r
+ * @param[in] duration The duration until the visibility mode is changed to #BT_ADAPTER_VISIBILITY_MODE_NON_DISCOVERABLE (in seconds).\r
+ * @a duration is used only for #BT_ADAPTER_VISIBILITY_MODE_LIMITED_DISCOVERABLE mode.\r
+ *\r
+ * @return 0 on success, otherwise a negative error value.\r
+ * @retval #BT_ERROR_NONE Successful\r
+ * @retval #BT_ERROR_NOT_INITIALIZED Not initialized\r
+ * @retval #BT_ERROR_NOT_ENABLED Not enabled\r
+ * @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter\r
+ * @retval #BT_ERROR_OPERATION_FAILED Operation failed\r
+ * @retval #BT_ERROR_PERMISSION_DENIED Permission denied\r
+ * @retval #BT_ERROR_NOT_SUPPORTED Not supported\r
+ *\r
+ * @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED.\r
+ * @post bt_adapter_visibility_mode_changed_cb() will be invoked if this function returns #BT_ERROR_NONE.\r
+ *\r
+ * @see bt_adapter_get_visibility()\r
+ * @see bt_adapter_visibility_mode_changed_cb()\r
+ * @see bt_adapter_set_visibility_mode_changed_cb()\r
+ * @see bt_adapter_unset_visibility_mode_changed_cb()\r
+ */\r
+int bt_adapter_set_visibility(bt_adapter_visibility_mode_e discoverable_mode, int duration);\r
+\r
+/**\r
+ * @internal\r
+ * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE\r
+ * @brief Registers a callback function to be invoked when the connectable state changes.\r
+ * @since_tizen 2.3\r
+ *\r
+ * @param[in] callback The callback function to register\r
+ * @param[in] user_data The user data to be passed to the callback function\r
+ *\r
+ * @return 0 on success, otherwise a negative error value.\r
+ * @retval #BT_ERROR_NONE Successful\r
+ * @retval #BT_ERROR_NOT_INITIALIZED Not initialized\r
+ * @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter\r
+ * @retval #BT_ERROR_NOT_SUPPORTED Not supported\r
+ *\r
+ * @pre The Bluetooth service must be initialized with bt_initialize().\r
+ * @post bt_adapter_connectable_changed_cb() will be invoked.\r
+ *\r
+ * @see bt_initialize()\r
+ * @see bt_adapter_connectable_changed_cb()\r
+ * @see bt_adapter_unset_connectable_changed_cb()\r
+ */\r
+int bt_adapter_set_connectable_changed_cb(bt_adapter_connectable_changed_cb callback, void *user_data);\r
+\r
+/**\r
+ * @internal\r
+ * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE\r
+ * @brief Unregisters the callback function.\r
+ * @since_tizen 2.3\r
+ *\r
+ * @return 0 on success, otherwise a negative error value.\r
+ * @retval #BT_ERROR_NONE Successful\r
+ * @retval #BT_ERROR_NOT_INITIALIZED Not initialized\r
+ * @retval #BT_ERROR_NOT_SUPPORTED Not supported\r
+ *\r
+ * @pre The Bluetooth service must be initialized with bt_initialize().\r
+ *\r
+ * @see bt_initialize()\r
+ * @see bt_adapter_set_connectable_changed_cb()\r
+ */\r
+int bt_adapter_unset_connectable_changed_cb(void);\r
+\r
+/**\r
+ * @internal\r
+ * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE\r
+ * @brief Gets the connectable state of local Bluetooth adapter.\r
+ * @since_tizen 2.3\r
+ *\r
+ * @remarks When connectable state is false, no device can connect to this device and visibility mode cannot be changed.\r
+ *\r
+ * @param[out] connectable The connectable state of local Bluetooth adapter\r
+ *\r
+ * @return 0 on success, otherwise a negative error value.\r
+ * @retval #BT_ERROR_NONE Successful\r
+ * @retval #BT_ERROR_NOT_INITIALIZED Not initialized\r
+ * @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter\r
+ * @retval #BT_ERROR_NOT_ENABLED Not enabled\r
+ * @retval #BT_ERROR_OPERATION_FAILED Operation failed\r
+ * @retval #BT_ERROR_NOT_SUPPORTED Not supported\r
+ *\r
+ * @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED.\r
+ *\r
+ * @see bt_adapter_set_connectable()\r
+ */\r
+int bt_adapter_get_connectable(bool *connectable);\r
+\r
+/**\r
+ * @internal\r
+ * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE\r
+ * @brief Sets the connectable state of local Bluetooth adapter.\r
+ * @since_tizen 2.3\r
+ * @privlevel platform\r
+ * @privilege %http://tizen.org/privilege/bluetooth.admin\r
+ *\r
+ * @remarks When connectable state is false, no device can connect to this device and visibility mode cannot be changed.\r
+ *\r
+ * @param[in] connectable The connectable state to set\r
+ *\r
+ * @return 0 on success, otherwise a negative error value.\r
+ * @retval #BT_ERROR_NONE Successful\r
+ * @retval #BT_ERROR_NOT_INITIALIZED Not initialized\r
+ * @retval #BT_ERROR_NOT_ENABLED Not enabled\r
+ * @retval #BT_ERROR_OPERATION_FAILED Operation failed\r
+ * @retval #BT_ERROR_PERMISSION_DENIED Permission denied\r
+ * @retval #BT_ERROR_NOT_SUPPORTED Not supported\r
+ *\r
+ * @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED.\r
+ * @post bt_adapter_connectable_changed_cb() will be invoked if this function returns #BT_ERROR_NONE.\r
+ *\r
+ * @see bt_adapter_get_connectable()\r
+ * @see bt_adapter_connectable_changed_cb()\r
+ * @see bt_adapter_set_connectable_changed_cb()\r
+ * @see bt_adapter_unset_connectable_changed_cb()\r
+ */\r
+int bt_adapter_set_connectable(bool connectable);\r
+\r
+/**\r
+ * @internal\r
+ * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE\r
+ * @brief Enables the local Bluetooth le adapter, asynchronously.\r
+ * @since_tizen 2.3\r
+ * @privlevel platform\r
+ * @privilege %http://tizen.org/privilege/bluetooth.admin\r
+ *\r
+ * @details This function enables Bluetooth protocol stack and hardware.\r
+ *\r
+ * @return 0 on success, otherwise a negative error value.\r
+ * @retval #BT_ERROR_NONE Successful\r
+ * @retval #BT_ERROR_NOT_INITIALIZED Not initialized\r
+ * @retval #BT_ERROR_ALREADY_DONE Already enabled\r
+ * @retval #BT_ERROR_NOW_IN_PROGRESS Operation now in progress\r
+ * @retval #BT_ERROR_PERMISSION_DENIED Permission denied\r
+ * @retval #BT_ERROR_NOT_SUPPORTED Not supported\r
+ *\r
+ * @pre Bluetooth service must be initialized with bt_initialize().\r
+ * @post This function invokes bt_adapter_le_state_changed_cb().\r
+ *\r
+ * @see bt_initialize()\r
+ * @see bt_adapter_le_get_state()\r
+ * @see bt_adapter_le_set_state_changed_cb()\r
+ * @see bt_adapter_le_unset_state_changed_cb()\r
+ * @see bt_adapter_le_state_changed_cb()\r
+ *\r
+ */\r
+int bt_adapter_le_enable(void);\r
+\r
+/**\r
+ * @internal\r
+ * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE\r
+ * @brief Disables the local Bluetooth le adapter, asynchronously.\r
+ * @since_tizen 2.3\r
+ * @privlevel platform\r
+ * @privilege %http://tizen.org/privilege/bluetooth.admin\r
+ *\r
+ * @details This function disables Bluetooth le protocol stack and hardware.\r
+ *\r
+ * @remarks\r
+ *\r
+ * @return 0 on success, otherwise a negative error value.\r
+ * @retval #BT_ERROR_NONE Successful\r
+ * @retval #BT_ERROR_NOT_INITIALIZED Not initialized\r
+ * @retval #BT_ERROR_NOT_ENABLED Not enabled\r
+ * @retval #BT_ERROR_NOW_IN_PROGRESS Operation now in progress\r
+ * @retval #BT_ERROR_PERMISSION_DENIED Permission denied\r
+ * @retval #BT_ERROR_NOT_SUPPORTED Not supported\r
+ *\r
+ * @pre The state of local Bluetooth must be #BT_ADAPTER_LE_ENABLED\r
+ * @post This function invokes bt_adapter_le_state_changed_cb().\r
+ *\r
+ * @see bt_adapter_le_get_state()\r
+ * @see bt_adapter_le_state_changed_cb()\r
+ * @see bt_adapter_le_set_state_changed_cb()\r
+ * @see bt_adapter_le_unset_state_changed_cb ()\r
+ *\r
+ */\r
+int bt_adapter_le_disable(void);\r
+\r
+/**\r
+ * @internal\r
+ * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE\r
+ * @brief Gets the current state of local Bluetooth adapter.\r
+ * @since_tizen 2.3\r
+ *\r
+ * @param[out] adapter_le_state The current adapter le state\r
+ *\r
+ * @return 0 on success, otherwise a negative error value.\r
+ * @retval #BT_ERROR_NONE Successful\r
+ * @retval #BT_ERROR_NOT_INITIALIZED Not initialized\r
+ * @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter\r
+ * @retval #BT_ERROR_NOT_SUPPORTED Not supported\r
+ *\r
+ * @pre Bluetooth service must be initialized with bt_initialize().\r
+ *\r
+ * @see bt_initialize()\r
+ */\r
+int bt_adapter_le_get_state(bt_adapter_le_state_e *adapter_le_state);\r
+\r
+/**\r
+ * @internal\r
+ * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE\r
+ * @brief Registers a callback function to be invoked when the Bluetooth adapter le state changes.\r
+ * @since_tizen 2.3\r
+ *\r
+ * @param[in] callback The callback function to invoke\r
+ * @param[in] user_data The user data to be passed to the callback function\r
+ *\r
+ * @return 0 on success, otherwise a negative error value.\r
+ * @retval #BT_ERROR_NONE Successful\r
+ * @retval #BT_ERROR_NOT_INITIALIZED Not initialized\r
+ * @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter\r
+ * @retval #BT_ERROR_NOT_SUPPORTED Not supported\r
+ *\r
+ * @pre The Bluetooth service must be initialized with bt_initialize().\r
+ * @post bt_adapter_le_state_changed_cb() will be invoked.\r
+ *\r
+ * @see bt_initialize()\r
+ * @see bt_adapter_le_state_changed_cb()\r
+ * @see bt_adapter_le_unset_state_changed_cb()\r
+ */\r
+int bt_adapter_le_set_state_changed_cb(bt_adapter_le_state_changed_cb callback, void *user_data);\r
+\r
+/**\r
+ * @internal\r
+ * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE\r
+ * @brief Unregisters the callback function.\r
+ * @since_tizen 2.3\r
+ *\r
+ * @return 0 on success, otherwise a negative error value.\r
+ * @retval #BT_ERROR_NONE Successful\r
+ * @retval #BT_ERROR_NOT_INITIALIZED Not initialized\r
+ * @retval #BT_ERROR_NOT_SUPPORTED Not supported\r
+ *\r
+ * @pre The Bluetooth service must be initialized with bt_initialize().\r
+ *\r
+ * @see bt_initialize()\r
+ * @see bt_adapter_le_set_state_changed_cb()\r
+ */\r
+int bt_adapter_le_unset_state_changed_cb(void);\r
+\r
+/**\r
+ * @internal\r
+ * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE\r
+ * @brief add address to whitelist for accepting scanning request.\r
+ * @since_tizen 2.3\r
+ * @privlevel platform\r
+ * @privilege %http://tizen.org/privilege/bluetooth.admin\r
+ *\r
+ * @remarks If the adress is in the whitelist then other LE devices are able to\r
+ * search this device. Before calling this API, make sure that the adapter is\r
+ * enabled. There is no callback event for this API.\r
+\r
+ * @param[in] address The other device's address\r
+ * @param[in] address_type The other device's address type\r
+ *\r
+ * @return 0 on success, otherwise a negative error value.\r
+ * @retval #BT_ERROR_NONE Successful\r
+ * @retval #BT_ERROR_NOT_INITIALIZED Not initialized\r
+ * @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter\r
+ * @retval #BT_ERROR_NOT_ENABLED Adapter is not enabled\r
+ * @retval #BT_ERROR_RESOURCE_BUSY Device or resource busy\r
+ * @retval #BT_ERROR_OPERATION_FAILED Operation failed\r
+ * @retval #BT_ERROR_PERMISSION_DENIED Permission denied\r
+ * @retval #BT_ERROR_NOT_SUPPORTED Not supported\r
+ *\r
+ * @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED.\r
+ *\r
+ * @see bt_adapter_le_start_advertising()\r
+ * @see bt_adapter_le_stop_advertising()\r
+ */\r
+int bt_adapter_le_add_white_list(const char *address, bt_device_address_type_e address_type);\r
+\r
+/**\r
+ * @internal\r
+ * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE\r
+ * @brief remove address from the whitelist for not accepting scanning request.\r
+ * @since_tizen 2.3\r
+ * @privlevel platform\r
+ * @privilege %http://tizen.org/privilege/bluetooth.admin\r
+ *\r
+ * @remarks If the adress is in the whitelist then other LE devices are able to\r
+ * search this device. Before calling this API, make sure that the adapter is\r
+ * enabled. There is no callback event for this API.\r
+ *\r
+ * @param[in] address The other device's address\r
+ * @param[in] address_type The other device's address type\r
+ *\r
+ * @return 0 on success, otherwise a negative error value.\r
+ * @retval #BT_ERROR_NONE Successful\r
+ * @retval #BT_ERROR_NOT_INITIALIZED Not initialized\r
+ * @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter\r
+ * @retval #BT_ERROR_NOT_ENABLED Adapter is not enabled\r
+ * @retval #BT_ERROR_RESOURCE_BUSY Device or resource busy\r
+ * @retval #BT_ERROR_OPERATION_FAILED Operation failed\r
+ * @retval #BT_ERROR_PERMISSION_DENIED Permission denied\r
+ * @retval #BT_ERROR_NOT_SUPPORTED Not supported\r
+ *\r
+ * @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED.\r
+ *\r
+ * @see bt_adapter_le_start_advertising()\r
+ * @see bt_adapter_le_stop_advertising()\r
+ */\r
+int bt_adapter_le_remove_white_list(const char *address, bt_device_address_type_e address_type);\r
+\r
+/**\r
+ * @internal\r
+ * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE\r
+ * @brief clear address from the whitelist for not accepting scanning request.\r
+ * @since_tizen 2.3\r
+ * @privlevel platform\r
+ * @privilege %http://tizen.org/privilege/bluetooth.admin\r
+ *\r
+ * @remarks If the adress is in the whitelist then other LE devices are able to\r
+ * search this device. Before calling this API, make sure that the adapter is\r
+ * enabled. There is no callback event for this API.\r
+ *\r
+ * @return 0 on success, otherwise a negative error value.\r
+ * @retval #BT_ERROR_NONE Successful\r
+ * @retval #BT_ERROR_NOT_INITIALIZED Not initialized\r
+ * @retval #BT_ERROR_NOT_ENABLED Adapter is not enabled\r
+ * @retval #BT_ERROR_RESOURCE_BUSY Device or resource busy\r
+ * @retval #BT_ERROR_OPERATION_FAILED Operation failed\r
+ * @retval #BT_ERROR_PERMISSION_DENIED Permission denied\r
+ * @retval #BT_ERROR_NOT_SUPPORTED Not supported\r
+ *\r
+ * @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED.\r
+ *\r
+ * @see bt_adapter_le_start_advertising()\r
+ * @see bt_adapter_le_stop_advertising()\r
+ */\r
+int bt_adapter_le_clear_white_list(void);\r
+\r
+/**\r
+ * @internal\r
+ * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE\r
+ * @brief Sets the Privacy feature state of local Bluetooth adapter.\r
+ * @since_tizen 2.3\r
+ * @privlevel platform\r
+ * @privilege %http://tizen.org/privilege/bluetooth.admin\r
+ *\r
+ * @param[in] enable_privacy The privacy feature to set/unset.\r
+ *\r
+ * @return 0 on success, otherwise a negative error value.\r
+ * @retval #BT_ERROR_NONE Successful\r
+ * @retval #BT_ERROR_NOT_INITIALIZED Not initialized\r
+ * @retval #BT_ERROR_NOT_ENABLED Not enabled\r
+ * @retval #BT_ERROR_OPERATION_FAILED Operation failed\r
+ * @retval #BT_ERROR_PERMISSION_DENIED Permission denied\r
+ * @retval #BT_ERROR_NOT_SUPPORTED Not supported\r
+ *\r
+ * @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED.\r
+ * @pre The state of local Bluetooth must be #BT_ADAPTER_LE_ENABLED.\r
+ *\r
+ */\r
+int bt_adapter_le_enable_privacy(bool enable_privacy);\r
+\r
+/**\r
+ * @internal\r
+ * @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE\r
+ * @brief Creates a bond with a remote Bluetooth device, asynchronously.\r
+ * @since_tizen 2.3\r
+ * @privlevel platform\r
+ * @privilege %http://tizen.org/privilege/bluetooth.admin\r
+ *\r
+ * @remarks A bond can be destroyed by bt_device_destroy_bond().\n\r
+ * The bonding request can be cancelled by bt_device_cancel_bonding().\r
+ *\r
+ * @param[in] remote_address The address of the remote Bluetooth device with which the bond should be created\r
+ * @param[in] conn_type The connection type(LE or BREDR) to create bond with remote device\r
+ *\r
+ * @return 0 on success, otherwise a negative error value.\r
+ * @retval #BT_ERROR_NONE Successful\r
+ * @retval #BT_ERROR_NOT_INITIALIZED Not initialized\r
+ * @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter\r
+ * @retval #BT_ERROR_NOT_ENABLED Not enabled\r
+ * @retval #BT_ERROR_RESOURCE_BUSY Device or resource busy\r
+ * @retval #BT_ERROR_OPERATION_FAILED Operation failed\r
+ * @retval #BT_ERROR_PERMISSION_DENIED Permission denied\r
+ * @retval #BT_ERROR_NOT_SUPPORTED Not supported\r
+ *\r
+ * @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED.\r
+ * @pre The remote device must be discoverable with bt_adapter_start_device_discovery().\r
+ * @post This function invokes bt_device_bond_created_cb().\r
+ *\r
+ * @see bt_adapter_start_device_discovery()\r
+ * @see bt_device_create_bond()\r
+ * @see bt_device_bond_created_cb()\r
+ * @see bt_device_cancel_bonding()\r
+ * @see bt_device_destroy_bond()\r
+ * @see bt_device_set_bond_created_cb()\r
+ * @see bt_device_unset_bond_created_cb()\r
+ */\r
+int bt_device_create_bond_by_type(const char *remote_address,\r
+ bt_device_connection_link_type_e conn_type);\r
+\r
+/**\r
+ * @internal\r
+ * @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE\r
+ * @brief Cancels service search process.\r
+ * @since_tizen 2.3\r
+ * @privlevel platform\r
+ * @privilege %http://tizen.org/privilege/bluetooth.admin\r
+ *\r
+ * @return 0 on success, otherwise a negative error value.\r
+ * @retval #BT_ERROR_NONE Successful\r
+ * @retval #BT_ERROR_NOT_INITIALIZED Not initialized\r
+ * @retval #BT_ERROR_NOT_ENABLED Not enabled\r
+ * @retval #BT_ERROR_REMOTE_DEVICE_NOT_BONDED Remote device not bonded\r
+ * @retval #BT_ERROR_NOT_IN_PROGRESS Operation not in progress\r
+ * @retval #BT_ERROR_OPERATION_FAILED Operation failed\r
+ * @retval #BT_ERROR_PERMISSION_DENIED Permission denied\r
+ * @retval #BT_ERROR_NOT_SUPPORTED Not supported\r
+ *\r
+ * @pre The service search must be in progress by bt_device_start_service_search().\r
+ *\r
+ * @see bt_device_start_service_search()\r
+ * @see bt_device_service_searched_cb()\r
+ * @see bt_device_set_service_searched_cb()\r
+ * @see bt_device_unset_service_searched_cb()\r
+ */\r
+int bt_device_cancel_service_search(void);\r
+\r
+/**\r
+ * @internal\r
+ * @ingroup CAPI_NETWORK_BLUETOOTH_SOCKET_MODULE\r
+ * @brief Starts listening on passed rfcomm socket.\r
+ * @since_tizen 2.3\r
+ * @privlevel platform\r
+ * @privilege %http://tizen.org/privilege/bluetooth.admin\r
+ * @details bt_socket_connection_requested_cb() will be called when a RFCOMM connection is requested.\r
+ *\r
+ * @param[in] socket_fd The file descriptor socket on which start to listen\r
+ * @param[in] max_pending_connections The number of pending connections\r
+ *\r
+ * @return 0 on success, otherwise a negative error value.\r
+ * @retval #BT_ERROR_NONE Successful\r
+ * @retval #BT_ERROR_NOT_INITIALIZED Not initialized\r
+ * @retval #BT_ERROR_NOT_ENABLED Not enabled\r
+ * @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter\r
+ * @retval #BT_ERROR_OPERATION_FAILED Operation failed\r
+ * @retval #BT_ERROR_PERMISSION_DENIED Permission denied\r
+ * @retval #BT_ERROR_NOT_SUPPORTED Not supported\r
+ *\r
+ * @pre The socket must be created with bt_socket_create_rfcomm().\r
+ * @post This function invokes bt_socket_connection_state_changed_cb().\r
+ *\r
+ * @see bt_socket_create_rfcomm()\r
+ * @see bt_socket_set_connection_requested_cb()\r
+ * @see bt_socket_unset_connection_requested_cb()\r
+ * @see bt_socket_connection_requested_cb()\r
+ */\r
+int bt_socket_listen(int socket_fd, int max_pending_connections);\r
+\r
+/**\r
+ * @internal\r
+ * @ingroup CAPI_NETWORK_BLUETOOTH_SOCKET_MODULE\r
+ * @brief Accepts a connection request.\r
+ * @since_tizen 2.3\r
+ * @privlevel platform\r
+ * @privilege %http://tizen.org/privilege/bluetooth.admin\r
+ * @param[in] requested_socket_fd The file descriptor of socket on which a connection is requested\r
+ * @return 0 on success, otherwise a negative error value.\r
+ * @retval #BT_ERROR_NONE Successful\r
+ * @retval #BT_ERROR_NOT_INITIALIZED Not initialized\r
+ * @retval #BT_ERROR_NOT_ENABLED Not enabled\r
+ * @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter\r
+ * @retval #BT_ERROR_OPERATION_FAILED Operation failed\r
+ * @retval #BT_ERROR_PERMISSION_DENIED Permission denied\r
+ * @retval #BT_ERROR_NOT_SUPPORTED Not supported\r
+ *\r
+ * @pre The connection is requested by bt_socket_connection_requested_cb().\r
+ * @see bt_socket_create_rfcomm()\r
+ * @see bt_socket_connection_requested_cb()\r
+ * @see bt_socket_listen()\r
+ * @see bt_socket_reject()\r
+*/\r
+int bt_socket_accept(int requested_socket_fd);\r
+\r
+/**\r
+ * @internal\r
+ * @ingroup CAPI_NETWORK_BLUETOOTH_SOCKET_MODULE\r
+ * @brief Rejects a connection request.\r
+ * @since_tizen 2.3\r
+ * @privlevel platform\r
+ * @privilege %http://tizen.org/privilege/bluetooth.admin\r
+ * @param[in] socket_fd The file descriptor of socket on which a connection is requested\r
+ * @return 0 on success, otherwise a negative error value.\r
+ * @retval #BT_ERROR_NONE Successful\r
+ * @retval #BT_ERROR_NOT_INITIALIZED Not initialized\r
+ * @retval #BT_ERROR_NOT_ENABLED Not enabled\r
+ * @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter\r
+ * @retval #BT_ERROR_OPERATION_FAILED Operation failed\r
+ * @retval #BT_ERROR_PERMISSION_DENIED Permission denied\r
+ * @retval #BT_ERROR_NOT_SUPPORTED Not supported\r
+ *\r
+ * @pre The connection is requested by bt_socket_connection_requested_cb().\r
+ * @see bt_socket_create_rfcomm()\r
+ * @see bt_socket_connection_requested_cb()\r
+ * @see bt_socket_listen()\r
+ * @see bt_socket_accept()\r
+ */\r
+int bt_socket_reject(int socket_fd);\r
+\r
+/**\r
+ * @internal\r
+ * @ingroup CAPI_NETWORK_BLUETOOTH_OPP_SERVER_MODULE\r
+ * @brief Initializes the Bluetooth OPP server requested by bt_opp_server_push_requested_cb().\r
+ * @since_tizen 2.3\r
+ * @details The popup appears when an OPP connection is requested from a remote device.\r
+ * If you accept the request, then connection will be established and bt_opp_server_push_requested_cb() will be called.\r
+ * At that time, you can call either bt_opp_server_accept() or bt_opp_server_reject().\r
+ * @remarks This function must be called to start Bluetooth OPP server. You must free all resources of the Bluetooth service\r
+ * by calling bt_opp_server_deinitialize() if Bluetooth OPP service is no longer needed.\r
+ * @param[in] destination The destination path\r
+ * @param[in] push_requested_cb The callback called when a push is requested\r
+ * @param[in] user_data The user data to be passed to the callback function\r
+ * @return 0 on success, otherwise a negative error value.\r
+ * @retval #BT_ERROR_NONE Successful\r
+ * @retval #BT_ERROR_NOT_INITIALIZED Not initialized\r
+ * @retval #BT_ERROR_NOT_ENABLED Not enabled\r
+ * @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter\r
+ * @retval #BT_ERROR_RESOURCE_BUSY Device or resource busy\r
+ * @retval #BT_ERROR_OPERATION_FAILED Operation failed\r
+ * @retval #BT_ERROR_NOT_SUPPORTED Not supported\r
+ *\r
+ * @see bt_opp_server_push_requested_cb()\r
+ * @see bt_opp_server_deinitialize()\r
+ * @see bt_opp_server_accept()\r
+ * @see bt_opp_server_reject()\r
+ */\r
+int bt_opp_server_initialize(const char *destination, bt_opp_server_push_requested_cb push_requested_cb, void *user_data);\r
+\r
+/**\r
+ * @internal\r
+ * @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_AG_MODULE\r
+ * @brief Opens a SCO(Synchronous Connection Oriented link) to connected remote device, asynchronously.\r
+ * @since_tizen 2.3\r
+ * @privlevel platform\r
+ * @privilege %http://tizen.org/privilege/bluetooth.admin\r
+ * @return 0 on success, otherwise a negative error value.\r
+ * @retval #BT_ERROR_NONE Successful\r
+ * @retval #BT_ERROR_NOT_INITIALIZED Not initialized\r
+ * @retval #BT_ERROR_NOT_ENABLED Not enabled\r
+ * @retval #BT_ERROR_REMOTE_DEVICE_NOT_BONDED Remote device is not bonded\r
+ * @retval #BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED Remote device is not connected\r
+ * @retval #BT_ERROR_ALREADY_DONE Operation is already done\r
+ * @retval #BT_ERROR_OPERATION_FAILED Operation failed\r
+ * @retval #BT_ERROR_PERMISSION_DENIED Permission denied\r
+ * @retval #BT_ERROR_NOT_SUPPORTED Not supported\r
+ *\r
+ * @pre The Bluetooth audio device must be connected with bt_audio_connect().\r
+ * @post bt_ag_sco_state_changed_cb() will be invoked.\r
+ * @see bt_ag_close_sco()\r
+ * @see bt_ag_sco_state_changed_cb()\r
+ * @see bt_audio_connect()\r
+ */\r
+int bt_ag_open_sco(void);\r
+\r
+/**\r
+ * @internal\r
+ * @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_AG_MODULE\r
+ * @brief Closes an opened SCO(Synchronous Connection Oriented link), asynchronously.\r
+ * @since_tizen 2.3\r
+ * @privlevel platform\r
+ * @privilege %http://tizen.org/privilege/bluetooth.admin\r
+ * @return 0 on success, otherwise a negative error value.\r
+ * @retval #BT_ERROR_NONE Successful\r
+ * @retval #BT_ERROR_NOT_INITIALIZED Not initialized\r
+ * @retval #BT_ERROR_NOT_ENABLED Not enabled\r
+ * @retval #BT_ERROR_REMOTE_DEVICE_NOT_BONDED Remote device is not bonded\r
+ * @retval #BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED Remote device is not connected\r
+ * @retval #BT_ERROR_PERMISSION_DENIED Permission denied\r
+ * @retval #BT_ERROR_NOT_SUPPORTED Not supported\r
+ *\r
+ * @pre The SCO must be opened with bt_ag_open_sco().\r
+ * @post bt_ag_sco_state_changed_cb() will be invoked.\r
+ * @see bt_ag_open_sco()\r
+ * @see bt_ag_sco_state_changed_cb()\r
+ */\r
+int bt_ag_close_sco(void);\r
+\r
+/**\r
+ * @internal\r
+ * @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_AG_MODULE\r
+ * @brief Checks whether an opened SCO(Synchronous Connection Oriented link) exists or not.\r
+ * @since_tizen 2.3\r
+ * @param[out] opened The SCO status: (@c true = opened, @c false = not opened)\r
+ * @return 0 on success, otherwise a negative error value.\r
+ * @retval #BT_ERROR_NONE Successful\r
+ * @retval #BT_ERROR_NOT_INITIALIZED Not initialized\r
+ * @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter\r
+ * @retval #BT_ERROR_NOT_ENABLED Not enabled\r
+ * @retval #BT_ERROR_NOT_SUPPORTED Not supported\r
+ *\r
+ * @pre The Bluetooth audio service must be initialized with bt_audio_initialize().\r
+ * @see bt_ag_open_sco()\r
+ * @see bt_ag_close_sco()\r
+ */\r
+int bt_ag_is_sco_opened(bool *opened);\r
+\r
+/**\r
+ * @internal\r
+ * @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_AG_MODULE\r
+ * @brief Registers a callback function that will be invoked when the SCO(Synchronous Connection Oriented link) state is changed.\r
+ * @since_tizen 2.3\r
+ * @param[in] callback The callback function to register\r
+ * @param[in] user_data The user data to be passed to the callback function\r
+ * @return 0 on success, otherwise a negative error value.\r
+ * @retval #BT_ERROR_NONE Successful\r
+ * @retval #BT_ERROR_NOT_INITIALIZED Not initialized\r
+ * @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter\r
+ * @retval #BT_ERROR_NOT_SUPPORTED Not supported\r
+ *\r
+ * @pre The Bluetooth audio service must be initialized with bt_audio_initialize().\r
+ * @see bt_audio_initialize()\r
+ * @see bt_ag_sco_state_changed_cb()\r
+ * @see bt_ag_unset_sco_state_changed_cb()\r
+ */\r
+int bt_ag_set_sco_state_changed_cb(bt_ag_sco_state_changed_cb callback, void *user_data);\r
+\r
+/**\r
+ * @internal\r
+ * @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_AG_MODULE\r
+ * @brief Unregisters a callback function that will be invoked when the SCO(Synchronous Connection Oriented link) state is changed.\r
+ * @since_tizen 2.3\r
+ * @return 0 on success, otherwise a negative error value.\r
+ * @retval #BT_ERROR_NONE Successful\r
+ * @retval #BT_ERROR_NOT_INITIALIZED Not initialized\r
+ * @retval #BT_ERROR_NOT_SUPPORTED Not supported\r
+ *\r
+ * @pre The Bluetooth audio service must be initialized with bt_audio_initialize().\r
+ * @see bt_audio_initialize()\r
+ * @see bt_ag_sco_state_changed_cb()\r
+ * @see bt_ag_set_sco_state_changed_cb()\r
+ */\r
+int bt_ag_unset_sco_state_changed_cb(void);\r
+\r
+/**\r
+ * @internal\r
+ * @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_AG_MODULE\r
+ * @brief Notifies the call event to the remote bluetooth device.\r
+ * @since_tizen 2.3\r
+ * @privlevel platform\r
+ * @privilege %http://tizen.org/privilege/bluetooth.admin\r
+ * @remarks Before notifying #BT_AG_CALL_EVENT_ANSWERED or #BT_AG_CALL_EVENT_DIALING, you should open SCO(Synchronous Connection Oriented link)\r
+ * if Bluetooth Hands-Free need SCO connection.\r
+ * @param[in] event The call event\r
+ * @param[in] call_id The call ID\r
+ * @param[in] phone_number The phone number. You must set this value in case of #BT_AG_CALL_EVENT_DIALING and #BT_AG_CALL_EVENT_INCOMING.\r
+ * In other cases, this value can be NULL.\r
+ * @return 0 on success, otherwise a negative error value.\r
+ * @retval #BT_ERROR_NONE Successful\r
+ * @retval #BT_ERROR_NOT_INITIALIZED Not initialized\r
+ * @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter\r
+ * @retval #BT_ERROR_NOT_ENABLED Not enabled\r
+ * @retval #BT_ERROR_REMOTE_DEVICE_NOT_BONDED Remote device is not bonded\r
+ * @retval #BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED Remote device is not connected\r
+ * @retval #BT_ERROR_PERMISSION_DENIED Permission denied\r
+ * @retval #BT_ERROR_NOT_SUPPORTED Not supported\r
+ *\r
+ * @pre The Bluetooth audio device must be connected with bt_audio_connect().\r
+ * @see bt_audio_connect()\r
+ */\r
+int bt_ag_notify_call_event(bt_ag_call_event_e event, unsigned int call_id, const char *phone_number);\r
+\r
+/**\r
+ * @internal\r
+ * @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_AG_MODULE\r
+ * @brief Notifies the call list to the remote bluetooth device.\r
+ * @since_tizen 2.3\r
+ * @privlevel platform\r
+ * @privilege %http://tizen.org/privilege/bluetooth.admin\r
+ * @param[in] list The call list\r
+ * @return 0 on success, otherwise a negative error value.\r
+ * @retval #BT_ERROR_NONE Successful\r
+ * @retval #BT_ERROR_NOT_INITIALIZED Not initialized\r
+ * @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter\r
+ * @retval #BT_ERROR_NOT_ENABLED Not enabled\r
+ * @retval #BT_ERROR_REMOTE_DEVICE_NOT_BONDED Remote device is not bonded\r
+ * @retval #BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED Remote device is not connected\r
+ * @retval #BT_ERROR_OPERATION_FAILED Operation failed\r
+ * @retval #BT_ERROR_PERMISSION_DENIED Permission denied\r
+ * @retval #BT_ERROR_NOT_SUPPORTED Not supported\r
+ *\r
+ * @pre The Bluetooth audio device must be connected with bt_audio_connect().\r
+ * @see bt_audio_connect()\r
+ */\r
+int bt_ag_notify_call_list(bt_call_list_h list);\r
+\r
+/**\r
+ * @internal\r
+ * @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_AG_MODULE\r
+ * @brief Notifies the state of voice recognition.\r
+ * @since_tizen 2.3\r
+ * @privlevel platform\r
+ * @privilege %http://tizen.org/privilege/bluetooth.admin\r
+ * @param[in] state The state of voice recognition: (@c true = enabled, @c false = disabled)\r
+ * @return 0 on success, otherwise a negative error value.\r
+ * @retval #BT_ERROR_NONE Successful\r
+ * @retval #BT_ERROR_NOT_INITIALIZED Not initialized\r
+ * @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter\r
+ * @retval #BT_ERROR_NOT_ENABLED Not enabled\r
+ * @retval #BT_ERROR_REMOTE_DEVICE_NOT_BONDED Remote device is not bonded\r
+ * @retval #BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED Remote device is not connected\r
+ * @retval #BT_ERROR_OPERATION_FAILED Operation failed\r
+ * @retval #BT_ERROR_PERMISSION_DENIED Permission denied\r
+ * @retval #BT_ERROR_NOT_SUPPORTED Not supported\r
+ *\r
+ * @pre The Bluetooth audio device must be connected with bt_audio_connect().\r
+ * @see bt_audio_connect()\r
+ */\r
+int bt_ag_notify_voice_recognition_state(bool state);\r
+\r
+/**\r
+ * @internal\r
+ * @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_AG_MODULE\r
+ * @brief Registers a callback function that will be invoked when a call handling event happened from Hands-Free.\r
+ * @since_tizen 2.3\r
+ * @param[in] callback The callback function to register\r
+ * @param[in] user_data The user data to be passed to the callback function\r
+ * @return 0 on success, otherwise a negative error value.\r
+ * @retval #BT_ERROR_NONE Successful\r
+ * @retval #BT_ERROR_NOT_INITIALIZED Not initialized\r
+ * @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter\r
+ * @retval #BT_ERROR_NOT_SUPPORTED Not supported\r
+ *\r
+ * @pre The Bluetooth audio service must be initialized with bt_audio_initialize().\r
+ * @see bt_audio_initialize()\r
+ * @see bt_ag_call_handling_event_cb()\r
+ * @see bt_ag_unset_call_handling_event_cb()\r
+ */\r
+int bt_ag_set_call_handling_event_cb(bt_ag_call_handling_event_cb callback, void *user_data);\r
+\r
+/**\r
+ * @internal\r
+ * @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_AG_MODULE\r
+ * @brief Unregisters a callback function that will be invoked when a call handling event happened from Hands-Free.\r
+ * @since_tizen 2.3\r
+ * @return 0 on success, otherwise a negative error value.\r
+ * @retval #BT_ERROR_NONE Successful\r
+ * @retval #BT_ERROR_NOT_INITIALIZED Not initialized\r
+ * @retval #BT_ERROR_NOT_SUPPORTED Not supported\r
+ *\r
+ * @pre The Bluetooth audio service must be initialized with bt_audio_initialize().\r
+ * @see bt_audio_initialize()\r
+ * @see bt_ag_call_handling_event_cb()\r
+ * @see bt_ag_set_call_handling_event_cb()\r
+ */\r
+int bt_ag_unset_call_handling_event_cb(void);\r
+\r
+/**\r
+ * @internal\r
+ * @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_AG_MODULE\r
+ * @brief Registers a callback function that will be invoked when a multi call handling event happened from Hands-Free.\r
+ * @since_tizen 2.3\r
+ * @param[in] callback The callback function to register\r
+ * @param[in] user_data The user data to be passed to the callback function\r
+ * @return 0 on success, otherwise a negative error value.\r
+ * @retval #BT_ERROR_NONE Successful\r
+ * @retval #BT_ERROR_NOT_INITIALIZED Not initialized\r
+ * @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter\r
+ * @retval #BT_ERROR_NOT_SUPPORTED Not supported\r
+ *\r
+ * @pre The Bluetooth audio service must be initialized with bt_audio_initialize().\r
+ * @see bt_audio_initialize()\r
+ * @see bt_ag_multi_call_handling_event_cb()\r
+ * @see bt_ag_unset_multi_call_handling_event_cb()\r
+ */\r
+int bt_ag_set_multi_call_handling_event_cb(bt_ag_multi_call_handling_event_cb callback, void *user_data);\r
+\r
+/**\r
+ * @internal\r
+ * @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_AG_MODULE\r
+ * @brief Unregisters a callback function that will be invoked when a multi call handling event happened from Hands-Free.\r
+ * @since_tizen 2.3\r
+ * @return 0 on success, otherwise a negative error value.\r
+ * @retval #BT_ERROR_NONE Successful\r
+ * @retval #BT_ERROR_NOT_INITIALIZED Not initialized\r
+ * @retval #BT_ERROR_NOT_SUPPORTED Not supported\r
+ *\r
+ * @pre The Bluetooth audio service must be initialized with bt_audio_initialize().\r
+ * @see bt_audio_initialize()\r
+ * @see bt_ag_multi_call_handling_event_cb()\r
+ * @see bt_ag_set_multi_call_handling_event_cb()\r
+ */\r
+int bt_ag_unset_multi_call_handling_event_cb(void);\r
+\r
+/**\r
+ * @internal\r
+ * @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_AG_MODULE\r
+ * @brief Registers a callback function that will be invoked when a DTMF(Dual Tone Multi Frequency) is transmitted from Hands-Free.\r
+ * @since_tizen 2.3\r
+ * @param[in] callback The callback function to register\r
+ * @param[in] user_data The user data to be passed to the callback function\r
+ * @return 0 on success, otherwise a negative error value.\r
+ * @retval #BT_ERROR_NONE Successful\r
+ * @retval #BT_ERROR_NOT_INITIALIZED Not initialized\r
+ * @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter\r
+ * @retval #BT_ERROR_NOT_SUPPORTED Not supported\r
+ *\r
+ * @pre The Bluetooth audio service must be initialized with bt_audio_initialize().\r
+ * @see bt_audio_initialize()\r
+ * @see bt_ag_dtmf_transmitted_cb()\r
+ * @see bt_ag_unset_dtmf_transmitted_cb()\r
+ */\r
+int bt_ag_set_dtmf_transmitted_cb(bt_ag_dtmf_transmitted_cb callback, void *user_data);\r
+\r
+/**\r
+ * @internal\r
+ * @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_AG_MODULE\r
+ * @brief Unregisters a callback function that will be invoked when a DTMF(Dual Tone Multi Frequency) is transmitted from Hands-Free.\r
+ * @since_tizen 2.3\r
+ * @return 0 on success, otherwise a negative error value.\r
+ * @retval #BT_ERROR_NONE Successful\r
+ * @retval #BT_ERROR_NOT_INITIALIZED Not initialized\r
+ * @retval #BT_ERROR_NOT_SUPPORTED Not supported\r
+ *\r
+ * @pre The Bluetooth audio service must be initialized with bt_audio_initialize().\r
+ * @see bt_audio_initialize()\r
+ * @see bt_ag_dtmf_transmitted_cb()\r
+ * @see bt_ag_set_dtmf_transmitted_cb()\r
+ */\r
+int bt_ag_unset_dtmf_transmitted_cb(void);\r
+\r
+/**\r
+ * @internal\r
+ * @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_AG_MODULE\r
+ * @brief Notifies the speaker gain to the remote device.\r
+ * @since_tizen 2.3\r
+ * @privlevel platform\r
+ * @privilege %http://tizen.org/privilege/bluetooth.admin\r
+ * @details This function sends a signal to the remote device. This signal has the gain value.\r
+ * @a gain is represented on a scale from 0 to 15. This value is absolute value relating to a particular volume level.\r
+ * When the speaker gain of remote device is changed to the requested gain, bt_audio_speaker_gain_changed_cb() will be called.\r
+ * @param[in] gain The gain of speaker (0 ~ 15)\r
+ * @return 0 on success, otherwise a negative error value.\r
+ * @retval #BT_ERROR_NONE Successful\r
+ * @retval #BT_ERROR_NOT_INITIALIZED Not initialized\r
+ * @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter\r
+ * @retval #BT_ERROR_NOT_ENABLED Not enabled\r
+ * @retval #BT_ERROR_OPERATION_FAILED Operation failed\r
+ * @retval #BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED Remote device is not connected\r
+ * @retval #BT_ERROR_PERMISSION_DENIED Permission denied\r
+ * @retval #BT_ERROR_NOT_SUPPORTED Not supported\r
+ *\r
+ * @pre The remote device is connected by bt_audio_connect() with #BT_AUDIO_PROFILE_TYPE_HSP_HFP service.\r
+ * @see bt_ag_get_speaker_gain()\r
+ * @see bt_ag_set_speaker_gain_changed_cb()\r
+ * @see bt_ag_unset_speaker_gain_changed_cb()\r
+ */\r
+int bt_ag_notify_speaker_gain(int gain);\r
+\r
+/**\r
+ * @internal\r
+ * @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_AG_MODULE\r
+ * @brief Gets the current speaker gain of the remote device.\r
+ * @since_tizen 2.3\r
+ * @details This function gets the value of speaker gain of the remote device.\r
+ * @a gain is represented on a scale from 0 to 15. This value is absolute value relating to a particular volume level.\r
+ * @param[out] gain The gain of speaker (0 ~ 15)\r
+ * @return 0 on success, otherwise a negative error value.\r
+ * @retval #BT_ERROR_NONE Successful\r
+ * @retval #BT_ERROR_NOT_INITIALIZED Not initialized\r
+ * @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter\r
+ * @retval #BT_ERROR_NOT_ENABLED Not enabled\r
+ * @retval #BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED Remote device is not connected\r
+ * @retval #BT_ERROR_NOT_SUPPORTED Not supported\r
+ *\r
+ * @pre The remote device is connected by bt_audio_connect() with #BT_AUDIO_PROFILE_TYPE_HSP_HFP service.\r
+ * @see bt_ag_notify_speaker_gain()\r
+ * @see bt_ag_set_speaker_gain_changed_cb()\r
+ * @see bt_ag_unset_speaker_gain_changed_cb()\r
+ */\r
+int bt_ag_get_speaker_gain(int *gain);\r
+\r
+/**\r
+ * @internal\r
+ * @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_AG_MODULE\r
+ * @brief Checks whether the remoted device enables NREC(Noise Reduction and Echo Canceling) or not.\r
+ * @since_tizen 2.3\r
+ * @param[out] enabled The NREC status: (@c true = enabled, @c false = not enabled)\r
+ * @return 0 on success, otherwise a negative error value.\r
+ * @retval #BT_ERROR_NONE Successful\r
+ * @retval #BT_ERROR_NOT_INITIALIZED Not initialized\r
+ * @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter\r
+ * @retval #BT_ERROR_NOT_ENABLED Not enabled\r
+ * @retval #BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED Remote device is not connected\r
+ * @retval #BT_ERROR_NOT_SUPPORTED Not supported\r
+ *\r
+ * @pre The remote device is connected by bt_audio_connect() with #BT_AUDIO_PROFILE_TYPE_HSP_HFP service.\r
+ * @see bt_audio_connect()\r
+ */\r
+int bt_ag_is_nrec_enabled(bool *enabled);\r
+\r
+/**\r
+ * @internal\r
+ * @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_AG_MODULE\r
+ * @brief Registers a callback function that will be invoked when the speaker gain of the remote device is changed.\r
+ * @since_tizen 2.3\r
+ * @details This function let you know the change of the speaker gain of the remote device.\r
+ * @a gain is represented on a scale from 0 to 15. This value is absolute value relating to a particular volume level.\r
+ * @param[in] callback The callback function to register\r
+ * @param[in] user_data The user data to be passed to the callback function\r
+ * @return 0 on success, otherwise a negative error value.\r
+ * @retval #BT_ERROR_NONE Successful\r
+ * @retval #BT_ERROR_NOT_INITIALIZED Not initialized\r
+ * @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter\r
+ * @retval #BT_ERROR_NOT_SUPPORTED Not supported\r
+ *\r
+ * @pre The Bluetooth audio service must be initialized with bt_audio_initialize().\r
+ * @see bt_audio_initialize()\r
+ * @see bt_ag_unset_speaker_gain_changed_cb()\r
+ */\r
+int bt_ag_set_speaker_gain_changed_cb(bt_ag_speaker_gain_changed_cb callback, void *user_data);\r
+\r
+/**\r
+ * @internal\r
+ * @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_AG_MODULE\r
+ * @brief Unregisters a callback function that will be invoked when the speaker gain of the remote device is changed.\r
+ * @since_tizen 2.3\r
+ * @return 0 on success, otherwise a negative error value.\r
+ * @retval #BT_ERROR_NONE Successful\r
+ * @retval #BT_ERROR_NOT_INITIALIZED Not initialized\r
+ * @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter\r
+ * @retval #BT_ERROR_NOT_SUPPORTED Not supported\r
+ *\r
+ * @pre The Bluetooth audio service must be initialized with bt_audio_initialize().\r
+ * @see bt_audio_initialize()\r
+ * @see bt_ag_set_speaker_gain_changed_cb()\r
+ */\r
+int bt_ag_unset_speaker_gain_changed_cb(void);\r
+\r
+/**\r
+ * @internal\r
+ * @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_AG_MODULE\r
+ * @brief Registers a callback function that will be invoked when the microphone gain of the remote device is changed.\r
+ * @since_tizen 2.3\r
+ * @param[in] callback The callback function to register\r
+ * @param[in] user_data The user data to be passed to the callback function\r
+ * @return 0 on success, otherwise a negative error value.\r
+ * @retval #BT_ERROR_NONE Successful\r
+ * @retval #BT_ERROR_NOT_INITIALIZED Not initialized\r
+ * @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter\r
+ * @retval #BT_ERROR_NOT_SUPPORTED Not supported\r
+ *\r
+ * @pre The Bluetooth audio service must be initialized with bt_audio_initialize().\r
+ * @see bt_audio_initialize()\r
+ * @see bt_ag_unset_microphone_gain_changed_cb()\r
+ */\r
+int bt_ag_set_microphone_gain_changed_cb(bt_ag_microphone_gain_changed_cb callback, void *user_data);\r
+\r
+/**\r
+ * @internal\r
+ * @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_AG_MODULE\r
+ * @brief Unregisters a callback function that will be invoked when the microphone gain of the remote device is changed.\r
+ * @since_tizen 2.3\r
+ * @return 0 on success, otherwise a negative error value.\r
+ * @retval #BT_ERROR_NONE Successful\r
+ * @retval #BT_ERROR_NOT_INITIALIZED Not initialized\r
+ * @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter\r
+ * @retval #BT_ERROR_NOT_SUPPORTED Not supported\r
+ *\r
+ * @pre The Bluetooth audio service must be initialized with bt_audio_initialize().\r
+ * @see bt_audio_initialize()\r
+ * @see bt_ag_set_microphone_gain_changed_cb()\r
+ */\r
+int bt_ag_unset_microphone_gain_changed_cb(void);\r
+\r
+/**\r
+ * @internal\r
+ * @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_AG_CALL_MODULE\r
+ * @brief Creates a handle of call list.\r
+ * @since_tizen 2.3\r
+ * @param[out] list The handle of call list\r
+ * @return 0 on success, otherwise a negative error value.\r
+ * @retval #BT_ERROR_NONE Successful\r
+ * @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter\r
+ * @retval #BT_ERROR_OUT_OF_MEMORY Out of memory\r
+ * @retval #BT_ERROR_PERMISSION_DENIED Permission denied\r
+ * @retval #BT_ERROR_NOT_SUPPORTED Not supported\r
+ *\r
+ * @see bt_call_list_destroy()\r
+ */\r
+int bt_call_list_create(bt_call_list_h *list);\r
+\r
+/**\r
+ * @internal\r
+ * @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_AG_CALL_MODULE\r
+ * @brief Destroys the handle of call list.\r
+ * @since_tizen 2.3\r
+ * @param[in] list The handle of call list\r
+ * @return 0 on success, otherwise a negative error value.\r
+ * @retval #BT_ERROR_NONE Successful\r
+ * @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter\r
+ * @retval #BT_ERROR_NOT_SUPPORTED Not supported\r
+ *\r
+ * @see bt_call_list_create()\r
+ */\r
+int bt_call_list_destroy(bt_call_list_h list);\r
+\r
+/**\r
+ * @internal\r
+ * @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_AG_CALL_MODULE\r
+ * @brief Resets the handle of call list.\r
+ * @since_tizen 2.3\r
+ * @param[in] list The handle of call list\r
+ * @return 0 on success, otherwise a negative error value.\r
+ * @retval #BT_ERROR_NONE Successful\r
+ * @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter\r
+ * @retval #BT_ERROR_NOT_SUPPORTED Not supported\r
+ *\r
+ * @see bt_call_list_create()\r
+ */\r
+int bt_call_list_reset(bt_call_list_h list);\r
+\r
+/**\r
+ * @internal\r
+ * @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_AG_CALL_MODULE\r
+ * @brief Adds a call to the handle of call list.\r
+ * @since_tizen 2.3\r
+ * @param[in] list The handle of call list\r
+ * @param[in] call_id The call ID\r
+ * @param[in] state The state of audio gate call\r
+ * @param[in] phone_number The phone number. You must set this value in case of #BT_AG_CALL_EVENT_DIALING and #BT_AG_CALL_EVENT_INCOMING.\r
+ * @return 0 on success, otherwise a negative error value.\r
+ * @retval #BT_ERROR_NONE Successful\r
+ * @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter\r
+ * @retval #BT_ERROR_OUT_OF_MEMORY Out of memory\r
+ * @retval #BT_ERROR_NOT_SUPPORTED Not supported\r
+ *\r
+ * @see bt_call_list_create()\r
+ */\r
+int bt_call_list_add(bt_call_list_h list, unsigned int call_id, bt_ag_call_state_e state, const char *phone_number);\r
+\r
+/**\r
+ * @internal\r
+ * @ingroup CAPI_NETWORK_BLUETOOTH_PAN_NAP_MODULE\r
+ * @brief Activates the NAP(Network Access Point).\r
+ * @since_tizen 2.3\r
+ * @privlevel public\r
+ * @privilege %http://tizen.org/privilege/bluetooth\r
+ * @return 0 on success, otherwise a negative error value.\r
+ * @retval #BT_ERROR_NONE Successful\r
+ * @retval #BT_ERROR_NOT_INITIALIZED Not initialized\r
+ * @retval #BT_ERROR_NOT_ENABLED Not enabled\r
+ * @retval #BT_ERROR_OPERATION_FAILED Operation failed\r
+ * @retval #BT_ERROR_ALREADY_DONE Operation is already done\r
+ * @retval #BT_ERROR_PERMISSION_DENIED Permission denied\r
+ * @retval #BT_ERROR_NOT_SUPPORTED Not supported\r
+ *\r
+ * @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED\r
+ * @see bt_nap_deactivate()\r
+ */\r
+int bt_nap_activate(void);\r
+\r
+/**\r
+ * @internal\r
+ * @ingroup CAPI_NETWORK_BLUETOOTH_PAN_NAP_MODULE\r
+ * @brief Deactivates the NAP(Network Access Point).\r
+ * @since_tizen 2.3\r
+ * @privlevel public\r
+ * @privilege %http://tizen.org/privilege/bluetooth\r
+ * @return 0 on success, otherwise a negative error value.\r
+ * @retval #BT_ERROR_NONE Successful\r
+ * @retval #BT_ERROR_NOT_INITIALIZED Not initialized\r
+ * @retval #BT_ERROR_NOT_ENABLED Not enabled\r
+ * @retval #BT_ERROR_OPERATION_FAILED Operation failed\r
+ * @retval #BT_ERROR_ALREADY_DONE Operation is already done\r
+ * @retval #BT_ERROR_PERMISSION_DENIED Permission denied\r
+ * @retval #BT_ERROR_NOT_SUPPORTED Not supported\r
+ *\r
+ * @pre The Bluetooth NAP service must be activated with bt_nap_activate().\r
+ * @see bt_nap_activate()\r
+ */\r
+int bt_nap_deactivate(void);\r
+\r
+/**\r
+ * @internal\r
+ * @ingroup CAPI_NETWORK_BLUETOOTH_PAN_NAP_MODULE\r
+ * @brief Disconnects the all PANUs(Personal Area Networking User) which are connected to you.\r
+ * @since_tizen 2.3\r
+ * @privlevel public\r
+ * @privilege %http://tizen.org/privilege/bluetooth\r
+ * @return 0 on success, otherwise a negative error value.\r
+ * @retval #BT_ERROR_NONE Successful\r
+ * @retval #BT_ERROR_NOT_INITIALIZED Not initialized\r
+ * @retval #BT_ERROR_NOT_ENABLED Not enabled\r
+ * @retval #BT_ERROR_OPERATION_FAILED Operation failed\r
+ * @retval #BT_ERROR_PERMISSION_DENIED Permission denied\r
+ * @retval #BT_ERROR_NOT_SUPPORTED Not supported\r
+ *\r
+ * @pre The Bluetooth NAP service must be activated with bt_nap_activate().\r
+ * @see bt_nap_activate()\r
+ */\r
+int bt_nap_disconnect_all(void);\r
+\r
+/**\r
+ * @internal\r
+ * @ingroup CAPI_NETWORK_BLUETOOTH_PAN_NAP_MODULE\r
+ * @brief Disconnects the specified PANU(Personal Area Networking User) which is connected to you.\r
+ * @since_tizen 2.3\r
+ * @privlevel public\r
+ * @privilege %http://tizen.org/privilege/bluetooth\r
+ * @param[in] remote_address The remote address\r
+ * @return 0 on success, otherwise a negative error value.\r
+ * @retval #BT_ERROR_NONE Successful\r
+ * @retval #BT_ERROR_NOT_INITIALIZED Not initialized\r
+ * @retval #BT_ERROR_NOT_ENABLED Not enabled\r
+ * @retval #BT_ERROR_OPERATION_FAILED Operation failed\r
+ * @retval #BT_ERROR_PERMISSION_DENIED Permission denied\r
+ * @retval #BT_ERROR_NOT_SUPPORTED Not supported\r
+ *\r
+ * @pre The Bluetooth NAP service must be activated with bt_nap_activate().\r
+ * @see bt_nap_activate()\r
+ */\r
+int bt_nap_disconnect(const char *remote_address);\r
+\r
+/**\r
+ * @internal\r
+ * @ingroup CAPI_NETWORK_BLUETOOTH_PAN_NAP_MODULE\r
+ * @brief Registers a callback function that will be invoked when the connection state changes.\r
+ * @since_tizen 2.3\r
+ * @param[in] callback The callback function to register\r
+ * @param[in] user_data The user data to be passed to the callback function\r
+ * @return 0 on success, otherwise a negative error value.\r
+ * @retval #BT_ERROR_NONE Successful\r
+ * @retval #BT_ERROR_NOT_INITIALIZED Not initialized\r
+ * @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter\r
+ * @retval #BT_ERROR_NOT_SUPPORTED Not supported\r
+ *\r
+ * @pre The Bluetooth service must be initialized with bt_initialize().\r
+ * @post bt_nap_connection_state_changed_cb() will be invoked.\r
+ * @see bt_initialize()\r
+ * @see bt_nap_connection_state_changed_cb()\r
+ * @see bt_nap_unset_connection_state_changed_cb()\r
+ */\r
+int bt_nap_set_connection_state_changed_cb(bt_nap_connection_state_changed_cb callback, void *user_data);\r
+\r
+/**\r
+ * @internal\r
+ * @ingroup CAPI_NETWORK_BLUETOOTH_PAN_NAP_MODULE\r
+ * @brief Unregisters a callback function that will be invoked when the connection state changes.\r
+ * @since_tizen 2.3\r
+ * @return 0 on success, otherwise a negative error value.\r
+ * @retval #BT_ERROR_NONE Successful\r
+ * @retval #BT_ERROR_NOT_INITIALIZED Not initialized\r
+ * @retval #BT_ERROR_NOT_SUPPORTED Not supported\r
+ *\r
+ * @pre The Bluetooth service must be initialized with bt_initialize().\r
+ * @post bt_nap_connection_state_changed_cb() will be invoked.\r
+ * @see bt_initialize()\r
+ * @see bt_nap_connection_state_changed_cb()\r
+ * @see bt_nap_set_connection_state_changed_cb()\r
+ */\r
+int bt_nap_unset_connection_state_changed_cb(void);\r
+\r
+/**\r
+ * @internal\r
+ * @ingroup CAPI_NETWORK_BLUETOOTH_PAN_PANU_MODULE\r
+ * @brief Registers a callback function that will be invoked when the connection state changes.\r
+ * @since_tizen 2.3\r
+ * @param[in] callback The callback function to register\r
+ * @param[in] user_data The user data to be passed to the callback function\r
+ * @return 0 on success, otherwise a negative error value.\r
+ * @retval #BT_ERROR_NONE Successful\r
+ * @retval #BT_ERROR_NOT_INITIALIZED Not initialized\r
+ * @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter\r
+ * @retval #BT_ERROR_NOT_SUPPORTED Not supported\r
+ *\r
+ * @pre The Bluetooth service must be initialized with bt_initialize().\r
+ * @post bt_nap_connection_state_changed_cb() will be invoked.\r
+ * @see bt_initialize()\r
+ * @see bt_panu_connection_state_changed_cb()\r
+ * @see bt_panu_unset_connection_state_changed_cb()\r
+ */\r
+int bt_panu_set_connection_state_changed_cb(bt_panu_connection_state_changed_cb callback, void *user_data);\r
+\r
+/**\r
+ * @internal\r
+ * @ingroup CAPI_NETWORK_BLUETOOTH_PAN_PANU_MODULE\r
+ * @brief Unregisters a callback function that will be invoked when the connection state changes.\r
+ * @since_tizen 2.3\r
+ * @return 0 on success, otherwise a negative error value.\r
+ * @retval #BT_ERROR_NONE Successful\r
+ * @retval #BT_ERROR_NOT_INITIALIZED Not initialized\r
+ * @retval #BT_ERROR_NOT_SUPPORTED Not supported\r
+ *\r
+ * @pre The Bluetooth service must be initialized with bt_initialize().\r
+ * @post bt_nap_connection_state_changed_cb() will be invoked.\r
+ * @see bt_initialize()\r
+ * @see bt_panu_connection_state_changed_cb()\r
+ * @see bt_panu_set_connection_state_changed_cb()\r
+ */\r
+int bt_panu_unset_connection_state_changed_cb(void);\r
+\r
+/**\r
+ * @internal\r
+ * @ingroup CAPI_NETWORK_BLUETOOTH_PAN_PANU_MODULE\r
+ * @brief Connects the remote device with the PAN(Personal Area Networking) service, asynchronously.\r
+ * @since_tizen 2.3\r
+ * @privlevel public\r
+ * @privilege %http://tizen.org/privilege/bluetooth\r
+ * @param[in] remote_address The remote address\r
+ * @param[in] type The type of PAN service\r
+ * @return 0 on success, otherwise a negative error value.\r
+ * @retval #BT_ERROR_NONE Successful\r
+ * @retval #BT_ERROR_NOT_INITIALIZED Not initialized\r
+ * @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter\r
+ * @retval #BT_ERROR_NOT_ENABLED Not enabled\r
+ * @retval #BT_ERROR_REMOTE_DEVICE_NOT_BONDED Remote device is not bonded\r
+ * @retval #BT_ERROR_OUT_OF_MEMORY Out of memory\r
+ * @retval #BT_ERROR_OPERATION_FAILED Operation failed\r
+ * @retval #BT_ERROR_PERMISSION_DENIED Permission denied\r
+ * @retval #BT_ERROR_NOT_SUPPORTED Not supported\r
+ *\r
+ * @pre The local device must be bonded with the remote device by bt_device_create_bond().\r
+ * @post bt_panu_connection_state_changed_cb() will be invoked.\r
+ * @see bt_panu_disconnect()\r
+ * @see bt_panu_connection_state_changed_cb()\r
+ */\r
+int bt_panu_connect(const char *remote_address, bt_panu_service_type_e type);\r
+\r
+/**\r
+ * @internal\r
+ * @ingroup CAPI_NETWORK_BLUETOOTH_PAN_PANU_MODULE\r
+ * @brief Disconnects the remote device with the PAN(Personal Area Networking) service, asynchronously.\r
+ * @since_tizen 2.3\r
+ * @privlevel public\r
+ * @privilege %http://tizen.org/privilege/bluetooth\r
+ * @param[in] remote_address The remote address\r
+ * @return 0 on success, otherwise a negative error value.\r
+ * @retval #BT_ERROR_NONE Successful\r
+ * @retval #BT_ERROR_NOT_INITIALIZED Not initialized\r
+ * @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter\r
+ * @retval #BT_ERROR_NOT_ENABLED Not enabled\r
+ * @retval #BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED Remote device is not connected\r
+ * @retval #BT_ERROR_OUT_OF_MEMORY Out of memory\r
+ * @retval #BT_ERROR_OPERATION_FAILED Operation failed\r
+ * @retval #BT_ERROR_PERMISSION_DENIED Permission denied\r
+ * @retval #BT_ERROR_NOT_SUPPORTED Not supported\r
+ *\r
+ * @pre The remote device must be connected by bt_panu_connect().\r
+ * @post bt_panu_connection_state_changed_cb() will be invoked.\r
+ * @see bt_panu_connect()\r
+ * @see bt_panu_connection_state_changed_cb()\r
+ */\r
+int bt_panu_disconnect(const char *remote_address);\r
+\r
+/**\r
+ * @internal\r
+ * @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE\r
+ * @brief update LE connection.\r
+ * @since_tizen 2.3\r
+ * @privlevel platform\r
+ * @privilege %http://tizen.org/privilege/bluetooth.admin\r
+ * @return 0 on success, otherwise a negative error value.\r
+ * @retval #BT_ERROR_NONE Successful\r
+ * @retval #BT_ERROR_NOT_INITIALIZED Not initialized\r
+ * @retval #BT_ERROR_PERMISSION_DENIED Permission denied\r
+ * @retval #BT_ERROR_NOT_SUPPORTED Not supported\r
+ *\r
+ * @pre The Bluetooth service must be initialized by bt_initialize().\r
+ * @pre The remote device must be connected with bt_gatt_connect().\r
+ */\r
+int bt_device_le_conn_update(const char *device_address,\r
+ const bt_le_conn_update_s *parameters);\r
+\r
+/**\r
+ * @}\r
+ */\r
+\r
+\r
+#ifdef __cplusplus\r
+}\r
+#endif /* __cplusplus */\r
+\r
+#endif // __TIZEN_NETWORK_BLUETOOTH_INTERNAL_H__\r
+\r