return OAL_STATUS_SUCCESS;
}
+oal_status_t gatts_set_filter_policy(int filter_policy)
+{
+ int ret = OAL_STATUS_SUCCESS;
+
+ CHECK_OAL_GATT_ENABLED();
+
+ /* send the filter_policy value to the HAL Layer */
+ ret = gatt_api->server->set_filter_policy(filter_policy);
+
+ if (ret != BT_STATUS_SUCCESS) {
+ BT_ERR("set_filter_policy failed: %d",ret);
+ return convert_to_oal_status(ret);
+ }
+
+ return OAL_STATUS_SUCCESS;
+}
+
oal_status_t gatts_multi_adv_update(int instance_id,
int min_intv, int max_intv,
int adv_type, int chnl_map,
return OAL_STATUS_SUCCESS;
}
+oal_status_t gattc_enable_scan_filter(int client_if)
+{
+ int ret;
+
+ API_TRACE("");
+ CHECK_OAL_GATT_ENABLED();
+
+ BT_INFO("Enable Scan filter. Client If: %d", client_if);
+
+ ret = gatt_api->client->scan_filter_enable(client_if, TRUE);
+ if (ret != BT_STATUS_SUCCESS) {
+ BT_ERR("error: %s", status2string(ret));
+ return convert_to_oal_status(ret);
+ }
+ return OAL_STATUS_SUCCESS;
+}
+
+oal_status_t gattc_disable_scan_filter(int client_if)
+{
+ int ret;
+
+ API_TRACE("");
+ CHECK_OAL_GATT_ENABLED();
+
+ BT_INFO("Disable Scan filter. Client If: %d", client_if);
+
+ ret = gatt_api->client->scan_filter_enable(client_if, FALSE);
+ if (ret != BT_STATUS_SUCCESS) {
+ BT_ERR("error: %s", status2string(ret));
+ return convert_to_oal_status(ret);
+ }
+ return OAL_STATUS_SUCCESS;
+}
+
oal_status_t gattc_register_scan_filter(oal_ble_scan_filter_t* filter_data)
{
int ret;
return convert_to_oal_status(ret);
}
- feature_selection |= OAL_BLE_SCAN_FILTER_FEATURE_DEVICE_ADDRESS;
+ feature_selection |= OAL_BLE_SCAN_FILTER_FEATURE_DEVICE_NAME;
}
if (filter_data->added_features & OAL_BLE_SCAN_FILTER_FEATURE_SERVICE_UUID){
BT_INFO("OAL_BLE_SCAN_FILTER_FEATURE_SERVICE_UUID is being added");
return convert_to_oal_status(ret);
}
- feature_selection |= OAL_BLE_SCAN_FILTER_FEATURE_DEVICE_ADDRESS;
+ feature_selection |= OAL_BLE_SCAN_FILTER_FEATURE_SERVICE_UUID;
}
if (filter_data->added_features & OAL_BLE_SCAN_FILTER_FEATURE_SERVICE_SOLICITATION_UUID){
BT_INFO("OAL_BLE_SCAN_FILTER_FEATURE_SERVICE_SOLICITATION_UUID is being added");
return convert_to_oal_status(ret);
}
- feature_selection |= OAL_BLE_SCAN_FILTER_FEATURE_DEVICE_ADDRESS;
+ feature_selection |= OAL_BLE_SCAN_FILTER_FEATURE_SERVICE_SOLICITATION_UUID;
}
if (filter_data->added_features & OAL_BLE_SCAN_FILTER_FEATURE_SERVICE_DATA){
ret = gatt_api->client->scan_filter_add_remove(client_info,
return convert_to_oal_status(ret);
}
- feature_selection |= OAL_BLE_SCAN_FILTER_FEATURE_DEVICE_ADDRESS;
+ feature_selection |= OAL_BLE_SCAN_FILTER_FEATURE_SERVICE_DATA;
}
if (filter_data->added_features & OAL_BLE_SCAN_FILTER_FEATURE_MANUFACTURER_DATA){
ret = gatt_api->client->scan_filter_add_remove(client_info,
return convert_to_oal_status(ret);
}
- feature_selection |= OAL_BLE_SCAN_FILTER_FEATURE_DEVICE_ADDRESS;
+ feature_selection |= OAL_BLE_SCAN_FILTER_FEATURE_MANUFACTURER_DATA;
}
BT_DBG("Filter selection 0x%.2x", feature_selection);