Loading system/bta/gatt/bta_gattc_api.c +3 −2 Original line number Diff line number Diff line Loading @@ -522,9 +522,10 @@ tBTA_GATT_STATUS BTA_GATTC_GetNextIncludedService(UINT16 conn_id, ** count: number of elements in database. ** *******************************************************************************/ void BTA_GATTC_GetGattDb(UINT16 conn_id, btgatt_db_element_t **db, int *count) void BTA_GATTC_GetGattDb(UINT16 conn_id, UINT16 start_handle, UINT16 end_handle, btgatt_db_element_t **db, int *count) { bta_gattc_get_gatt_db(conn_id, db, count); bta_gattc_get_gatt_db(conn_id, start_handle, end_handle, db, count); } /******************************************************************************* Loading system/bta/gatt/bta_gattc_cache.c +15 −2 Original line number Diff line number Diff line Loading @@ -1427,6 +1427,7 @@ void bta_gattc_fill_gatt_db_el(btgatt_db_element_t *p_attr, ** *******************************************************************************/ static void bta_gattc_get_gatt_db_impl(tBTA_GATTC_SERV *p_srvc_cb, UINT16 start_handle, UINT16 end_handle, btgatt_db_element_t **db, int *count) { Loading @@ -1444,6 +1445,12 @@ static void bta_gattc_get_gatt_db_impl(tBTA_GATTC_SERV *p_srvc_cb, sn != list_end(p_srvc_cb->p_srvc_cache); sn = list_next(sn)) { tBTA_GATTC_CACHE *p_cur_srvc = list_node(sn); if (p_cur_srvc->s_handle < start_handle) continue; if (p_cur_srvc->e_handle > end_handle) break; db_size++; if (p_cur_srvc->p_attr) db_size += list_length(p_cur_srvc->p_attr); Loading @@ -1456,6 +1463,12 @@ static void bta_gattc_get_gatt_db_impl(tBTA_GATTC_SERV *p_srvc_cb, sn != list_end(p_srvc_cb->p_srvc_cache); sn = list_next(sn)) { tBTA_GATTC_CACHE *p_cur_srvc = list_node(sn); if (p_cur_srvc->s_handle < start_handle) continue; if (p_cur_srvc->e_handle > end_handle) break; bta_gattc_fill_gatt_db_el(curr_db_attr, p_cur_srvc->service_uuid.is_primary ? BTGATT_DB_PRIMARY_SERVICE : Loading Loading @@ -1530,7 +1543,7 @@ static void bta_gattc_get_gatt_db_impl(tBTA_GATTC_SERV *p_srvc_cb, ** Returns None. ** *******************************************************************************/ void bta_gattc_get_gatt_db(UINT16 conn_id, btgatt_db_element_t **db, int *count) void bta_gattc_get_gatt_db(UINT16 conn_id, UINT16 start_handle, UINT16 end_handle, btgatt_db_element_t **db, int *count) { tBTA_GATTC_CLCB *p_clcb = bta_gattc_find_clcb_by_conn_id(conn_id); Loading @@ -1551,7 +1564,7 @@ void bta_gattc_get_gatt_db(UINT16 conn_id, btgatt_db_element_t **db, int *count) APPL_TRACE_ERROR("No server cache available"); } bta_gattc_get_gatt_db_impl(p_clcb->p_srcb, db, count); bta_gattc_get_gatt_db_impl(p_clcb->p_srcb, start_handle, end_handle, db, count); } /******************************************************************************* Loading system/bta/gatt/bta_gattc_int.h +1 −1 Original line number Diff line number Diff line Loading @@ -536,7 +536,7 @@ extern void bta_gattc_search_service(tBTA_GATTC_CLCB *p_clcb, tBT_UUID *p_uuid); extern tBTA_GATT_STATUS bta_gattc_query_cache(UINT16 conn_id, UINT8 query_type, tBTA_GATT_SRVC_ID *p_srvc_id, tBTA_GATT_ID *p_start_rec,tBT_UUID *p_uuid_cond, tBTA_GATT_ID *p_output, void *p_param); extern void bta_gattc_get_gatt_db(UINT16 conn_id, btgatt_db_element_t **db, int *count); extern void bta_gattc_get_gatt_db(UINT16 conn_id, UINT16 start_handle, UINT16 end_handle, btgatt_db_element_t **db, int *count); extern tBTA_GATT_STATUS bta_gattc_init_cache(tBTA_GATTC_SERV *p_srvc_cb); extern void bta_gattc_rebuild_cache(tBTA_GATTC_SERV *p_srcv, UINT16 num_attr, tBTA_GATTC_NV_ATTR *p_attr, UINT16 attr_index); extern BOOLEAN bta_gattc_cache_save(tBTA_GATTC_SERV *p_srvc_cb, UINT16 conn_id); Loading system/bta/include/bta_gatt_api.h +2 −1 Original line number Diff line number Diff line Loading @@ -894,7 +894,8 @@ extern tBTA_GATT_STATUS BTA_GATTC_GetNextIncludedService(UINT16 conn_id, ** count: number of elements in db. ** *******************************************************************************/ extern void BTA_GATTC_GetGattDb(UINT16 conn_id, btgatt_db_element_t **db, int *count); extern void BTA_GATTC_GetGattDb(UINT16 conn_id, UINT16 start_handle, UINT16 end_handle, btgatt_db_element_t **db, int *count); /******************************************************************************* ** Loading system/btif/src/btif_gatt_client.c +1 −1 Original line number Diff line number Diff line Loading @@ -1366,7 +1366,7 @@ static void btgattc_handle_event(uint16_t event, char* p_param) { btgatt_db_element_t *db = NULL; int count = 0; BTA_GATTC_GetGattDb(p_cb->conn_id, &db, &count); BTA_GATTC_GetGattDb(p_cb->conn_id, 0x0000, 0xFFFF, &db, &count); HAL_CBACK(bt_gatt_callbacks, client->get_gatt_db_cb, p_cb->conn_id, db, count); Loading Loading
system/bta/gatt/bta_gattc_api.c +3 −2 Original line number Diff line number Diff line Loading @@ -522,9 +522,10 @@ tBTA_GATT_STATUS BTA_GATTC_GetNextIncludedService(UINT16 conn_id, ** count: number of elements in database. ** *******************************************************************************/ void BTA_GATTC_GetGattDb(UINT16 conn_id, btgatt_db_element_t **db, int *count) void BTA_GATTC_GetGattDb(UINT16 conn_id, UINT16 start_handle, UINT16 end_handle, btgatt_db_element_t **db, int *count) { bta_gattc_get_gatt_db(conn_id, db, count); bta_gattc_get_gatt_db(conn_id, start_handle, end_handle, db, count); } /******************************************************************************* Loading
system/bta/gatt/bta_gattc_cache.c +15 −2 Original line number Diff line number Diff line Loading @@ -1427,6 +1427,7 @@ void bta_gattc_fill_gatt_db_el(btgatt_db_element_t *p_attr, ** *******************************************************************************/ static void bta_gattc_get_gatt_db_impl(tBTA_GATTC_SERV *p_srvc_cb, UINT16 start_handle, UINT16 end_handle, btgatt_db_element_t **db, int *count) { Loading @@ -1444,6 +1445,12 @@ static void bta_gattc_get_gatt_db_impl(tBTA_GATTC_SERV *p_srvc_cb, sn != list_end(p_srvc_cb->p_srvc_cache); sn = list_next(sn)) { tBTA_GATTC_CACHE *p_cur_srvc = list_node(sn); if (p_cur_srvc->s_handle < start_handle) continue; if (p_cur_srvc->e_handle > end_handle) break; db_size++; if (p_cur_srvc->p_attr) db_size += list_length(p_cur_srvc->p_attr); Loading @@ -1456,6 +1463,12 @@ static void bta_gattc_get_gatt_db_impl(tBTA_GATTC_SERV *p_srvc_cb, sn != list_end(p_srvc_cb->p_srvc_cache); sn = list_next(sn)) { tBTA_GATTC_CACHE *p_cur_srvc = list_node(sn); if (p_cur_srvc->s_handle < start_handle) continue; if (p_cur_srvc->e_handle > end_handle) break; bta_gattc_fill_gatt_db_el(curr_db_attr, p_cur_srvc->service_uuid.is_primary ? BTGATT_DB_PRIMARY_SERVICE : Loading Loading @@ -1530,7 +1543,7 @@ static void bta_gattc_get_gatt_db_impl(tBTA_GATTC_SERV *p_srvc_cb, ** Returns None. ** *******************************************************************************/ void bta_gattc_get_gatt_db(UINT16 conn_id, btgatt_db_element_t **db, int *count) void bta_gattc_get_gatt_db(UINT16 conn_id, UINT16 start_handle, UINT16 end_handle, btgatt_db_element_t **db, int *count) { tBTA_GATTC_CLCB *p_clcb = bta_gattc_find_clcb_by_conn_id(conn_id); Loading @@ -1551,7 +1564,7 @@ void bta_gattc_get_gatt_db(UINT16 conn_id, btgatt_db_element_t **db, int *count) APPL_TRACE_ERROR("No server cache available"); } bta_gattc_get_gatt_db_impl(p_clcb->p_srcb, db, count); bta_gattc_get_gatt_db_impl(p_clcb->p_srcb, start_handle, end_handle, db, count); } /******************************************************************************* Loading
system/bta/gatt/bta_gattc_int.h +1 −1 Original line number Diff line number Diff line Loading @@ -536,7 +536,7 @@ extern void bta_gattc_search_service(tBTA_GATTC_CLCB *p_clcb, tBT_UUID *p_uuid); extern tBTA_GATT_STATUS bta_gattc_query_cache(UINT16 conn_id, UINT8 query_type, tBTA_GATT_SRVC_ID *p_srvc_id, tBTA_GATT_ID *p_start_rec,tBT_UUID *p_uuid_cond, tBTA_GATT_ID *p_output, void *p_param); extern void bta_gattc_get_gatt_db(UINT16 conn_id, btgatt_db_element_t **db, int *count); extern void bta_gattc_get_gatt_db(UINT16 conn_id, UINT16 start_handle, UINT16 end_handle, btgatt_db_element_t **db, int *count); extern tBTA_GATT_STATUS bta_gattc_init_cache(tBTA_GATTC_SERV *p_srvc_cb); extern void bta_gattc_rebuild_cache(tBTA_GATTC_SERV *p_srcv, UINT16 num_attr, tBTA_GATTC_NV_ATTR *p_attr, UINT16 attr_index); extern BOOLEAN bta_gattc_cache_save(tBTA_GATTC_SERV *p_srvc_cb, UINT16 conn_id); Loading
system/bta/include/bta_gatt_api.h +2 −1 Original line number Diff line number Diff line Loading @@ -894,7 +894,8 @@ extern tBTA_GATT_STATUS BTA_GATTC_GetNextIncludedService(UINT16 conn_id, ** count: number of elements in db. ** *******************************************************************************/ extern void BTA_GATTC_GetGattDb(UINT16 conn_id, btgatt_db_element_t **db, int *count); extern void BTA_GATTC_GetGattDb(UINT16 conn_id, UINT16 start_handle, UINT16 end_handle, btgatt_db_element_t **db, int *count); /******************************************************************************* ** Loading
system/btif/src/btif_gatt_client.c +1 −1 Original line number Diff line number Diff line Loading @@ -1366,7 +1366,7 @@ static void btgattc_handle_event(uint16_t event, char* p_param) { btgatt_db_element_t *db = NULL; int count = 0; BTA_GATTC_GetGattDb(p_cb->conn_id, &db, &count); BTA_GATTC_GetGattDb(p_cb->conn_id, 0x0000, 0xFFFF, &db, &count); HAL_CBACK(bt_gatt_callbacks, client->get_gatt_db_cb, p_cb->conn_id, db, count); Loading