1> removed unwanted files.
2> fixed other minor issues in the code.
Change-Id: Ic015225c33c9befe58f4e222af3c80e7a7613fd6
Signed-off-by: Sudha Bheemanna <b.sudha@samsung.com>
+++ /dev/null
-<manifest>
- <define>
- <domain name="capi-network-bluetooth-test"/>
- <request>
- <smack request="bt-service::public" type="w"/>
- <smack request="bt-service::platform" type="rw"/>
- </request>
- </define>
- <request>
- <domain name="capi-network-bluetooth-test"/>
- </request>
-</manifest>
+++ /dev/null
-<manifest>
- <request>
- <domain name="_"/>
- </request>
-</manifest>
Requires: %{name} = %{version}-%{release}
%description devel
-Network Bluetooth Framework (DEV).
-
-%package test
-Summary: Network Bluetooth Framework test application
-Group: Development/Connectivit
-Requires: %{name} = %{version}-%{release}
-
-%description test
-This package is C-API test application.
+Network Bluetooth Framework.
%devel_desc
%endif
MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
-cmake . -DCMAKE_INSTALL_PREFIX=/usr -DFULLVER=%{version} -DMAJORVER=${MAJORVER}
+%cmake . -DFULLVER=%{version} -DMAJORVER=${MAJORVER}
make %{?jobs:-j%jobs}
%install
%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
+
%post -p /sbin/ldconfig
%manifest %{name}.manifest
%license LICENSE.APLv2 LICENSE
%{_libdir}/libcapi-network-bluetooth.so.*
-%{_datadir}/license/capi-network-bluetooth
+#%{_datadir}/license/capi-network-bluetooth
-%files test
-%manifest bluetooth-test.manifest
-%{_bindir}/bt_unit_test
-%{_bindir}/bt_onoff
-/etc/smack/accesses.d/capi-network-bluetooth-test.efl
+#%files test
+#%manifest bluetooth-test.manifest
+#%{_bindir}/bt_unit_test
+#%{_bindir}/bt_onoff
+#/etc/smack/accesses.d/capi-network-bluetooth-test.efl
%files devel
%manifest %{name}-devel.manifest
%{_includedir}/network/bluetooth_type.h
%{_libdir}/pkgconfig/capi-network-bluetooth.pc
%{_libdir}/libcapi-network-bluetooth.so
-%{_datadir}/license/capi-network-bluetooth-devel
+#%{_datadir}/license/capi-network-bluetooth-devel
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_ERROR_NONE, BT_ADAPTER_DEVICE_DISCOVERY_FINISHED, NULL, bt_event_slot_container[event_index].user_data);
+ (_bt_get_error_code(param->result), 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));
bt_event_slot_container[event_index].user_data);
break;
+/* case BLUETOOTH_EVENT_MANUFACTURER_DATA_CHANGED:
+ BT_INFO("BLUETOOTH_EVENT_MANUFACTURER_DATA_CHANGED");
+
+ ((bt_adapter_manufacturer_data_changed_cb)bt_event_slot_container[event_index].callback)
+ (_bt_get_error_code(param->result, NULL, BLUETOOTH_EVENT_MANUFACTURER_DATA_CHANGED,
+ bt_event_slot_container[event_index].user_data);
+
+ break;*/
default:
break;
}
(*discovery_info)->rssi = (int)source_info->rssi;
(*discovery_info)->is_bonded = (bool)source_info->paired;
+#if 0
(*discovery_info)->appearance = 0;
(*discovery_info)->manufacturer_data_len = source_info->manufacturer_data.data_len;
} else {
(*discovery_info)->manufacturer_data = NULL;
}
-
+#endif
return BT_ERROR_NONE;
}
case BLUETOOTH_EVENT_DISCOVERY_STARTED:
case BLUETOOTH_EVENT_DISCOVERY_FINISHED:
case BLUETOOTH_EVENT_REMOTE_DEVICE_NAME_UPDATED:
- case BLUETOOTH_EVENT_REMOTE_DEVICE_DISAPPEARED:
return BT_EVENT_DEVICE_DISCOVERY_STATE_CHANGED;
case BLUETOOTH_EVENT_LE_DISCOVERY_STARTED:
case BLUETOOTH_EVENT_LE_DISCOVERY_FINISHED:
TARGET_LINK_LIBRARIES(${src_name} ${fw_name} ${${fw_test}_LDFLAGS})
ENDFOREACH()
-INSTALL(TARGETS bt_unit_test DESTINATION bin)
-INSTALL(TARGETS bt_onoff DESTINATION bin)
-INSTALL(FILES capi-network-bluetooth-test.efl DESTINATION /etc/smack/accesses.d/)
+#INSTALL(TARGETS bt_unit_test DESTINATION bin)
+#INSTALL(TARGETS bt_onoff DESTINATION bin)
const char *opp_uuid = "00001105-0000-1000-8000-00805f9b34fb";
static bt_unit_test_table_e current_tc_table;
-static char remote_addr[18] = "F6:FB:8F:D8:C8:7C";
+static char remote_addr[18] = "34:BB:26:5D:78:9C";
static bool input_automated_test_delay = false;
static int server_fd;
{"bt_device_is_profile_connected" , BT_UNIT_TEST_FUNCTION_DEVICE_IS_PROFILE_CONNECTED},
{"bt_device_set_bond_created_cb" , BT_UNIT_TEST_FUNCTION_DEVICE_SET_BOND_CREATED_CB},
{"bt_device_create_bond" , BT_UNIT_TEST_FUNCTION_DEVICE_CREATE_BOND},
+ {"bt_device_destroy_bond" , BT_UNIT_TEST_FUNCTION_DEVICE_DESTROY_BOND},
{"bt_device_create_bond_by_type" , BT_UNIT_TEST_FUNCTION_DEVICE_CREATE_BOND_BY_TYPE},
{NULL , 0x0000},
};
break;
}
+ case BT_UNIT_TEST_FUNCTION_DEVICE_DESTROY_BOND : {
+ ret = bt_device_destroy_bond(remote_addr);
+ TC_PRT("sudha returns %s\n", __bt_get_error_message(ret));
+ break;
+ }
+
case BT_UNIT_TEST_FUNCTION_DEVICE_CREATE_BOND_BY_TYPE : {
ret = bt_device_create_bond_by_type(remote_addr, BT_DEVICE_CONNECTION_LINK_LE);
TC_PRT("returns %s\n", __bt_get_error_message(ret));
BT_UNIT_TEST_FUNCTION_DEVICE_IS_PROFILE_CONNECTED,
BT_UNIT_TEST_FUNCTION_DEVICE_SET_BOND_CREATED_CB,
BT_UNIT_TEST_FUNCTION_DEVICE_CREATE_BOND,
+ BT_UNIT_TEST_FUNCTION_DEVICE_DESTROY_BOND,
BT_UNIT_TEST_FUNCTION_DEVICE_CREATE_BOND_BY_TYPE,
BT_UNIT_TEST_FUNCTION_SOCKET_CREATE_RFCOMM = 1,
BT_UNIT_TEST_FUNCTION_SOCKET_DESTROY_RFCOMM,
+++ /dev/null
-root capi-network-bluetooth-test rw----
-_default_ capi-network-bluetooth-test rw----
-capi-network-bluetooth-test bt-service::platform rw----
-capi-network-bluetooth-test bt-service::public -w----
+++ /dev/null
-root capi-network-bluetooth-test rw----
-_default_ capi-network-bluetooth-test rw----
-capi-network-bluetooth-test bt-service::platform rw----
-capi-network-bluetooth-test bt-service::public -w----