BT_ERROR_RESOURCE_BUSY = TIZEN_ERROR_RESOURCE_BUSY, /**< Device or resource busy */
BT_ERROR_TIMED_OUT = TIZEN_ERROR_TIMED_OUT, /**< Timeout error */
BT_ERROR_NOW_IN_PROGRESS = TIZEN_ERROR_NOW_IN_PROGRESS, /**< Operation now in progress */
- BT_ERROR_NOT_SUPPORTED = TIZEN_ERROR_NOT_SUPPORTED, /**< Not Supported */
- BT_ERROR_PERMISSION_DENIED = TIZEN_ERROR_PERMISSION_DENIED, /**< Permission denied */
- BT_ERROR_QUOTA_EXCEEDED = TIZEN_ERROR_QUOTA_EXCEEDED, /**< Quota exceeded */
- BT_ERROR_NOT_INITIALIZED = TIZEN_ERROR_BLUETOOTH|0x0101, /**< Local adapter not initialized */
- BT_ERROR_NOT_ENABLED = TIZEN_ERROR_BLUETOOTH|0x0102, /**< Local adapter not enabled */
- BT_ERROR_ALREADY_DONE = TIZEN_ERROR_BLUETOOTH|0x0103, /**< Operation already done */
- BT_ERROR_OPERATION_FAILED = TIZEN_ERROR_BLUETOOTH|0x0104, /**< Operation failed */
- BT_ERROR_NOT_IN_PROGRESS = TIZEN_ERROR_BLUETOOTH|0x0105, /**< Operation not in progress */
- BT_ERROR_REMOTE_DEVICE_NOT_BONDED = TIZEN_ERROR_BLUETOOTH|0x0106, /**< Remote device not bonded */
- BT_ERROR_AUTH_REJECTED = TIZEN_ERROR_BLUETOOTH|0x0107, /**< Authentication rejected */
- BT_ERROR_AUTH_FAILED = TIZEN_ERROR_BLUETOOTH|0x0108, /**< Authentication failed */
- BT_ERROR_REMOTE_DEVICE_NOT_FOUND = TIZEN_ERROR_BLUETOOTH|0x0109, /**< Remote device not found */
- BT_ERROR_SERVICE_SEARCH_FAILED = TIZEN_ERROR_BLUETOOTH|0x010A, /**< Service search failed */
- BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED = TIZEN_ERROR_BLUETOOTH|0x010B, /**< Remote device is not connected */
- BT_ERROR_AGAIN = TIZEN_ERROR_BLUETOOTH|0x010C, /**< Resource temporarily unavailable */
- BT_ERROR_SERVICE_NOT_FOUND = TIZEN_ERROR_BLUETOOTH|0x010D, /**< Service Not Found */
+ BT_ERROR_NOT_SUPPORTED = TIZEN_ERROR_NETWORK_CLASS|0x0111, /**< Not Supported */
+ BT_ERROR_PERMISSION_DENIED = TIZEN_ERROR_NETWORK_CLASS|0x0112, /**< Permission denied */
+ BT_ERROR_QUOTA_EXCEEDED = TIZEN_ERROR_NETWORK_CLASS|0x0113, /**< Quota exceeded */
+ BT_ERROR_NOT_INITIALIZED = TIZEN_ERROR_NETWORK_CLASS|0x0101, /**< Local adapter not initialized */
+ BT_ERROR_NOT_ENABLED = TIZEN_ERROR_NETWORK_CLASS|0x0102, /**< Local adapter not enabled */
+ BT_ERROR_ALREADY_DONE = TIZEN_ERROR_NETWORK_CLASS|0x0103, /**< Operation already done */
+ BT_ERROR_OPERATION_FAILED = TIZEN_ERROR_NETWORK_CLASS|0x0104, /**< Operation failed */
+ BT_ERROR_NOT_IN_PROGRESS = TIZEN_ERROR_NETWORK_CLASS|0x0105, /**< Operation not in progress */
+ BT_ERROR_REMOTE_DEVICE_NOT_BONDED = TIZEN_ERROR_NETWORK_CLASS|0x0106, /**< Remote device not bonded */
+ BT_ERROR_AUTH_REJECTED = TIZEN_ERROR_NETWORK_CLASS|0x0107, /**< Authentication rejected */
+ BT_ERROR_AUTH_FAILED = TIZEN_ERROR_NETWORK_CLASS|0x0108, /**< Authentication failed */
+ BT_ERROR_REMOTE_DEVICE_NOT_FOUND = TIZEN_ERROR_NETWORK_CLASS|0x0109, /**< Remote device not found */
+ BT_ERROR_SERVICE_SEARCH_FAILED = TIZEN_ERROR_NETWORK_CLASS|0x010A, /**< Service search failed */
+ BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED = TIZEN_ERROR_NETWORK_CLASS|0x010B, /**< Remote device is not connected */
+ BT_ERROR_AGAIN = TIZEN_ERROR_NETWORK_CLASS|0x010C, /**< Resource temporarily unavailable */
+ BT_ERROR_SERVICE_NOT_FOUND = TIZEN_ERROR_NETWORK_CLASS|0x010D, /**< Service Not Found */
} bt_error_e;
/**
-#sbs-git:slp/api/bluetooth capi-network-bluetooth 0.1.0 686c444083e4197845c768e5dd034022b1dfa250
Name: capi-network-bluetooth
Summary: Network Bluetooth Framework
Version: 0.1.52
Release: 1
Group: Connectivity/API
-License: Apache License, Version 2.0
+License: Apache-2.0
Source0: %{name}-%{version}.tar.gz
Source1001: %{name}.manifest
Source1002: %{name}-devel.manifest
-Requires(post): /sbin/ldconfig
-Requires(postun): /sbin/ldconfig
+#Requires(post): /sbin/ldconfig
+#Requires(postun): /sbin/ldconfig
BuildRequires: pkgconfig(dbus-glib-1)
BuildRequires: pkgconfig(dlog)
make %{?jobs:-j%jobs}
%install
-rm -rf %{buildroot}
%make_install
install -D -m 0644 LICENSE %{buildroot}%{_datadir}/license/capi-network-bluetooth
install -D -m 0644 LICENSE %{buildroot}%{_datadir}/license/capi-network-bluetooth-devel
int bt_adapter_enable(void)
{
- int error_code = BT_ERROR_NONE;
+ int error_code;
#ifdef TIZEN_WEARABLE
static const char* PRIVILEGE_ID_BLUETOOTH_ADMIN = "http://tizen.org/privilege/bluetooth.admin";
int bt_adapter_disable(void)
{
- int error_code = BT_ERROR_NONE;
+ int error_code;
BT_CHECK_INIT_STATUS();
error_code = _bt_get_error_code(bluetooth_disable_adapter());
int bt_adapter_reset(void)
{
- int error_code = BT_ERROR_NONE;
+ int error_code;
BT_CHECK_INIT_STATUS();
error_code = _bt_get_error_code(bluetooth_reset_adapter());
int bt_adapter_get_name(char **name)
{
- int ret = BT_ERROR_NONE;
+ int ret;
bluetooth_device_name_t loc_name = { {0} };
BT_CHECK_INIT_STATUS();
int bt_adapter_set_name(const char *name)
{
bluetooth_device_name_t loc_name = { {0} };
- int ret = BT_ERROR_NONE;
+ int ret;
BT_CHECK_INIT_STATUS();
BT_CHECK_INPUT_PARAMETER(name);
int bt_adapter_get_visibility(bt_adapter_visibility_mode_e *mode, int *duration)
{
bluetooth_discoverable_mode_t discoverable_mode = BLUETOOTH_DISCOVERABLE_MODE_CONNECTABLE;
- int ret = BT_ERROR_NONE;
+ int ret;
BT_CHECK_INIT_STATUS();
BT_CHECK_INPUT_PARAMETER(mode);
int bt_adapter_start_device_discovery(void)
{
- int error_code = BT_ERROR_NONE;
+ int error_code;
BT_CHECK_INIT_STATUS();
error_code = _bt_get_error_code(bluetooth_start_discovery(0, 0, BLUETOOTH_DEVICE_MAJOR_MASK_MISC));
int bt_adapter_stop_device_discovery(void)
{
- int error_code = BT_ERROR_NONE;
+ int error_code;
BT_CHECK_INIT_STATUS();
error_code = _bt_get_error_code(bluetooth_cancel_discovery());
telephony_event_callid_t *call_data = NULL;
char *device_addr = NULL;
int error_code = BT_ERROR_NONE;
- int event_index = -1;
+ int event_index;
bluetooth_network_device_info_t *dev_info = NULL;
bt_hdp_connected_t *hdp_conn_info = NULL;
bt_hdp_disconnected_t *hdp_disconn_info = NULL;
case BLUETOOTH_EVENT_DISCOVERY_FINISHED:
BT_INFO("bt_adapter_device_discovery_state_changed_cb() will be called with BT_ADAPTER_DEVICE_DISCOVERY_FINISHED");
((bt_adapter_device_discovery_state_changed_cb)bt_event_slot_container[event_index].callback)
- (_bt_get_error_code(param->result), BT_ADAPTER_DEVICE_DISCOVERY_FINISHED, NULL, bt_event_slot_container[event_index].user_data);
+ (BT_ERROR_NONE, BT_ADAPTER_DEVICE_DISCOVERY_FINISHED, NULL, bt_event_slot_container[event_index].user_data);
break;
case BLUETOOTH_EVENT_REMOTE_DEVICE_NAME_UPDATED:
BT_INFO("bt_adapter_device_discovery_state_changed_cb() will be called with BT_ADAPTER_DEVICE_DISCOVERY_FOUND");
(_bt_get_error_code(param->result), BT_ADAPTER_DEVICE_DISCOVERY_FOUND, NULL, bt_event_slot_container[event_index].user_data);
}
break;
+ case BLUETOOTH_EVENT_REMOTE_DEVICE_DISAPPEARED:
+ break;
case BLUETOOTH_EVENT_BONDING_FINISHED:
BT_INFO("bt_device_bond_created_cb() will be called");
_bt_get_bt_device_info_s(&bonded_device, (bluetooth_device_info_t *)(param->param_data));
int error = BT_ERROR_NONE;
BT_CHECK_INIT_STATUS();
- if (NULL == data || 0 >= size) {
+ if (NULL == data) {
BT_ERR("%s", _bt_convert_error_to_string(BT_ERROR_INVALID_PARAMETER));
}
error = bluetooth_hdp_send_data(channel, data, size);
int bt_socket_accept(int socket_fd)
{
-#ifdef ENABLE_TIZEN_2_4
- int error_code = BT_ERROR_NONE;
-
- BT_CHECK_INIT_STATUS();
-
- error_code = _bt_get_error_code(bluetooth_rfcomm_accept_connection(socket_fd));
- if (error_code != BT_ERROR_NONE) {
- BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code),
- error_code);
- }
-
- return error_code;
-#else
return BT_ERROR_NOT_SUPPORTED;
-#endif
}
int bt_socket_reject(int socket_fd)
break;
case BT_UNIT_TEST_FUNCTION_DEVICE_SET_CONNECTION_STAET_CHANGED_CB:
+#if 0
ret = bt_device_set_connection_state_changed_cb(__bt_device_connection_state_changed_cb, NULL);
TC_PRT("returns %s\n", __bt_get_error_message(ret));
+#endif
break;
case BT_UNIT_TEST_FUNCTION_DEVICE_UNSET_CONNECTION_STAET_CHANGED_CB:
{
char buf[BUFFER_LEN] = { 0 };
- unsigned int len = 0;
- int test_id;
+ gsize len = 0;
+ long test_id;
bool is_call_api = false;
if (is_sub_index)