*/
int bt_device_cancel_service_search(void);
+/**
+ * @internal
+ * @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE
+ * @brief Sets a profile restricted connection for a device
+ * @since_tizen 3.0
+ * @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
+ */
+int bt_device_set_profile_restricted(const char *device_address, bt_restricted_profile_t profile, bool restricted);
+
+/**
+ * @internal
+ * @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE
+ * @brief Gets a profile restricted connection for a device
+ * @since_tizen 3.0
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #BT_ERROR_NONE Successful
+ * @retval #BT_ERROR_NOT_INITIALIZED Not initialized
+ * @retval #BT_ERROR_NOT_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
+ */
+int bt_device_get_profile_restricted(const char *device_address, bt_restricted_profile_t profile, int *restricted);
+
/**
* @internal
* @ingroup CAPI_NETWORK_BLUETOOTH_SOCKET_MODULE
BT_TRUSTED_PROFILE_ALL = 0xFFFFFFFF,
} bt_trusted_profile_t;
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE
+ * @brief Restricted Profile enumeration.
+ * @since_tizen 3.0
+ *
+ * @see bt_device_set_profile_restricted()
+ * @see bt_device_get_profile_restricted()
+ */
+typedef enum {
+ BT_RESTRICTED_PROFILE_HFP_HS = 1,
+ BT_RESTRICTED_PROFILE_A2DP,
+} bt_restricted_profile_t;
+
/**
* @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE
* @brief Called when Trusted Profiles is changed.
return BT_ERROR_NONE;
}
+int bt_device_set_profile_restricted(const char *device_address,
+ bt_restricted_profile_t profile, bool restricted)
+{
+ bluetooth_device_address_t addr_hex = { {0,} };
+ int error_code = BT_ERROR_NONE;
+
+ BT_CHECK_INIT_STATUS();
+ BT_CHECK_INPUT_PARAMETER(device_address);
+
+ _bt_convert_address_to_hex(&addr_hex, device_address);
+ error_code = _bt_get_error_code(bluetooth_set_profile_restricted(&addr_hex,
+ profile, restricted));
+ if (error_code != BT_ERROR_NONE) {
+ BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code);
+ }
+
+ return error_code;
+}
+
+int bt_device_get_profile_restricted(const char *device_address,
+ bt_restricted_profile_t profile, int *restricted)
+{
+ bluetooth_device_address_t addr_hex = { {0,} };
+ int profile_restricted;
+ int error_code = BT_ERROR_NONE;
+
+ BT_CHECK_INIT_STATUS();
+ BT_CHECK_INPUT_PARAMETER(device_address);
+
+ _bt_convert_address_to_hex(&addr_hex, device_address);
+ error_code = _bt_get_error_code(bluetooth_get_profile_restricted(&addr_hex,
+ profile, &profile_restricted));
+ if (error_code != BT_ERROR_NONE) {
+ BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code);
+ }
+ if (restricted)
+ *restricted = profile_restricted;
+ return error_code;
+}
+
int bt_device_le_set_data_length(const char *remote_address,
unsigned int max_tx_Octets, unsigned int max_tx_Time)
{