From: DoHyun Pyun Date: Mon, 12 Sep 2016 05:24:27 +0000 (+0900) Subject: Add bt_device_set_profile_restricted definition for tv and wearable X-Git-Tag: submit/tizen/20160912.055637^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=83af32ad96b74bcd35f36ffbf4994c100bc736c6;p=platform%2Fcore%2Fapi%2Fbluetooth.git Add bt_device_set_profile_restricted definition for tv and wearable Change-Id: I6b32907cb0a40243b18a0923af863fd5df511b6e Signed-off-by: DoHyun Pyun --- diff --git a/include/tv/bluetooth_internal.h b/include/tv/bluetooth_internal.h index 66e7d31..f7f124d 100644 --- a/include/tv/bluetooth_internal.h +++ b/include/tv/bluetooth_internal.h @@ -1086,6 +1086,44 @@ int bt_device_create_bond_by_type(const char *remote_address, */ 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 diff --git a/include/wearable/bluetooth_internal.h b/include/wearable/bluetooth_internal.h index a3f90dc..ced2205 100644 --- a/include/wearable/bluetooth_internal.h +++ b/include/wearable/bluetooth_internal.h @@ -1056,6 +1056,44 @@ int bt_device_cancel_service_search(void); */ int bt_device_get_connection_state(const char *remote_address, bt_device_connection_link_type_e link_type, bool *connected); +/** + * @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