bluedroid: support GATT robust caching feature

This commit is contained in:
chenjianhua
2022-12-07 15:06:27 +08:00
parent f4cd0b687d
commit 238d1375a8
12 changed files with 542 additions and 18 deletions

View File

@@ -405,6 +405,13 @@ typedef struct {
UINT8 pending_cl_req;
UINT8 next_slot_inq; /* index of next available slot in queue */
/* client supported feature */
UINT8 cl_supp_feat;
/* server supported feature */
UINT8 sr_supp_feat;
/* if false, should handle database out of sync */
BOOLEAN is_robust_cache_change_aware;
BOOLEAN in_use;
UINT8 tcb_idx;
tGATT_PREPARE_WRITE_RECORD prepare_write_record; /* prepare write packets record */
@@ -532,6 +539,12 @@ typedef struct {
tGATT_PROFILE_CLCB profile_clcb[GATT_MAX_APPS];
#endif ///GATTS_INCLUDED == TRUE
UINT16 handle_of_h_r; /* Handle of the handles reused characteristic value */
UINT16 handle_of_database_hash;
UINT16 handle_of_cl_supported_feat;
UINT16 handle_of_sr_supported_feat;
BT_OCTET16 database_hash;
UINT8 gatt_sr_supported_feat_mask;
UINT8 gatt_cl_supported_feat_mask;
tGATT_APPL_INFO cb_info;
@@ -759,4 +772,9 @@ extern BOOLEAN gatt_check_connection_state_by_tcb(tGATT_TCB *p_tcb);
extern void gatt_reset_bgdev_list(void);
extern uint16_t gatt_get_local_mtu(void);
extern void gatt_set_local_mtu(uint16_t mtu);
extern tGATT_STATUS gatts_calculate_datebase_hash(BT_OCTET16 hash);
extern BOOLEAN gatt_sr_is_cl_change_aware(tGATT_TCB *p_tcb);
extern void gatt_sr_init_cl_status(tGATT_TCB *p_tcb);
extern void gatt_sr_update_cl_status(tGATT_TCB *tcb, BOOLEAN chg_aware);
#endif