static void cb_adapter_device_found(int num_properties, bt_property_t *properties);
static void cb_adapter_properties(bt_status_t status,
int num_properties, bt_property_t *properties);
+static void cb_adapter_profile_connected_devices(uint8_t count, uint8_t bdaddr_list[][6]);
extern void cb_device_properties(bt_status_t status, bt_bdaddr_t *bd_addr,
int num_properties, bt_property_t *properties);
extern void cb_device_bond_state_changed(bt_status_t status, bt_bdaddr_t *bd_addr,
.size = sizeof(callbacks),
.adapter_state_changed_cb = cb_adapter_state_change,
.adapter_properties_cb = cb_adapter_properties,
+ .adapter_profile_connected_devices_cb = cb_adapter_profile_connected_devices,
.remote_device_properties_cb = cb_device_properties,
.device_found_cb = cb_adapter_device_found,
.discovery_state_changed_cb = cb_adapter_discovery_state_changed,
#ifdef TIZEN_BT_HAL
int oal_set_adapter_request_state(int enable)
{
+ CHECK_OAL_INITIALIZED();
+
return blued_api->set_hal_adapter_request_state(enable);
}
int oal_set_le_request_state(int enable)
{
+ CHECK_OAL_INITIALIZED();
+
return blued_api->set_hal_le_request_state(enable);
}
#endif
{
int ret;
- API_TRACE();
-
CHECK_OAL_INITIALIZED();
OAL_CHECK_PARAMETER(tx_time, return);
OAL_CHECK_PARAMETER(idle_time, return);
OAL_CHECK_PARAMETER(energy_used, return);
- BT_INFO("Get Adapter Energy Info");
+ BT_DBG("Get Adapter Energy Info");
#ifdef TIZEN_BT_HAL
ret = blued_api->get_adapter_energy_info(tx_time, rx_time, idle_time, energy_used);
return OAL_STATUS_SUCCESS;
}
+oal_status_t adapter_get_profile_connected_devices(const char *profile_uuid)
+{
+ int ret;
+
+ CHECK_OAL_INITIALIZED();
+
+ API_TRACE();
+
+ ret = blued_api->get_profile_connected_devices(profile_uuid);
+ if (ret != BT_STATUS_SUCCESS) {
+ BT_ERR("get_profile_connected_devices failed: [%s]", status2string(ret));
+ return convert_to_oal_status(ret);
+ }
+
+ return OAL_STATUS_SUCCESS;
+}
+
static oal_status_t set_scan_mode(bt_scan_mode_t mode)
{
bt_property_t prop;
bdstr_t bdstr;
CHECK_OAL_INITIALIZED();
- API_TRACE();
- BT_INFO("BT remote device Address: %s", bdt_bd2str(device_address, &bdstr));
+ BT_INFO("BT remote device Address: %s", bdt_bd2str(device_address, &bdstr) + 12);
ret = blued_api->adapter_le_set_white_list((bt_bdaddr_t*)device_address, address_type, is_add);
if (ret != BT_STATUS_SUCCESS) {
}
}
+static void cb_adapter_profile_connected_devices(uint8_t count, uint8_t addr_list[][6])
+{
+ event_adapter_profile_connected_devices *event_data;
+ int i;
+
+ event_data = g_malloc0(sizeof(event_adapter_profile_connected_devices));
+ event_data->count = count;
+ for (i = 0; i < count; i++) {
+ memcpy(event_data->addr_list[i].addr, addr_list[i], BT_ADDRESS_BYTES_NUM);
+ }
+ send_event(OAL_EVENT_ADAPTER_PROFILE_CONNECTED_DEVICES, event_data, sizeof(event_adapter_profile_connected_devices));
+}
+
static void cb_adapter_discovery_state_changed(bt_discovery_state_t state)
{
oal_event_t event;