Loading system/bta/gatt/bta_gattc_act.c +22 −0 Original line number Diff line number Diff line Loading @@ -2128,5 +2128,27 @@ void bta_gattc_listen(tBTA_GATTC_CB *p_cb, tBTA_GATTC_DATA * p_msg) } } } /******************************************************************************* ** ** Function bta_gattc_broadcast ** ** Description Start or stop broadcasting ** ** Returns void ** ********************************************************************************/ void bta_gattc_broadcast(tBTA_GATTC_CB *p_cb, tBTA_GATTC_DATA * p_msg) { tBTA_GATTC_RCB *p_clreg = bta_gattc_cl_get_regcb(p_msg->api_listen.client_if); tBTA_GATTC cb_data; (void)(p_cb); cb_data.reg_oper.client_if = p_msg->api_listen.client_if; cb_data.reg_oper.status = BTM_BleBroadcast(p_msg->api_listen.start); if (p_clreg && p_clreg->p_cback) (*p_clreg->p_cback)(BTA_GATTC_LISTEN_EVT, &cb_data); } #endif #endif system/bta/gatt/bta_gattc_api.c +26 −0 Original line number Diff line number Diff line Loading @@ -1056,5 +1056,31 @@ void BTA_GATTC_Listen(tBTA_GATTC_IF client_if, BOOLEAN start, BD_ADDR_PTR target return; } /******************************************************************************* ** ** Function BTA_GATTC_Broadcast ** ** Description Start broadcasting (non-connectable advertisements) ** ** Parameters client_if: client interface. ** start: to start or stop listening for connection ** ** Returns void ** *******************************************************************************/ void BTA_GATTC_Broadcast(tBTA_GATTC_IF client_if, BOOLEAN start) { tBTA_GATTC_API_LISTEN *p_buf; if ((p_buf = (tBTA_GATTC_API_LISTEN *) GKI_getbuf((UINT16)(sizeof(tBTA_GATTC_API_LISTEN) + BD_ADDR_LEN))) != NULL) { p_buf->hdr.event = BTA_GATTC_API_BROADCAST_EVT; p_buf->client_if = client_if; p_buf->start = start; bta_sys_sendmsg(p_buf); } return; } #endif /* BTA_GATT_INCLUDED */ system/bta/gatt/bta_gattc_int.h +2 −0 Original line number Diff line number Diff line Loading @@ -69,6 +69,7 @@ enum BTA_GATTC_API_REG_EVT, BTA_GATTC_API_DEREG_EVT, BTA_GATTC_API_LISTEN_EVT, BTA_GATTC_API_BROADCAST_EVT, BTA_GATTC_API_DISABLE_EVT, BTA_GATTC_ENC_CMPL_EVT }; Loading Loading @@ -484,6 +485,7 @@ extern void bta_gattc_send_open_cback( tBTA_GATTC_RCB *p_clreg, tBTA_GATT_STATUS extern void bta_gattc_process_api_refresh(tBTA_GATTC_CB *p_cb, tBTA_GATTC_DATA * p_msg); #if BLE_INCLUDED == TRUE extern void bta_gattc_listen(tBTA_GATTC_CB *p_cb, tBTA_GATTC_DATA * p_msg); extern void bta_gattc_broadcast(tBTA_GATTC_CB *p_cb, tBTA_GATTC_DATA * p_msg); #endif /* utility functions */ extern tBTA_GATTC_CLCB * bta_gattc_find_clcb_by_cif (UINT8 client_if, BD_ADDR remote_bda); Loading system/bta/gatt/bta_gattc_main.c +3 −0 Original line number Diff line number Diff line Loading @@ -385,6 +385,9 @@ BOOLEAN bta_gattc_hdl_event(BT_HDR *p_msg) case BTA_GATTC_API_LISTEN_EVT: bta_gattc_listen(p_cb, (tBTA_GATTC_DATA *) p_msg); break; case BTA_GATTC_API_BROADCAST_EVT: bta_gattc_broadcast(p_cb, (tBTA_GATTC_DATA *) p_msg); break; #endif case BTA_GATTC_ENC_CMPL_EVT: Loading system/bta/include/bta_gatt_api.h +15 −0 Original line number Diff line number Diff line Loading @@ -1030,6 +1030,21 @@ BTA_API extern void BTA_GATTC_Refresh(BD_ADDR remote_bda); *******************************************************************************/ BTA_API extern void BTA_GATTC_Listen(tBTA_GATTC_IF client_if, BOOLEAN start, BD_ADDR_PTR target_bda); /******************************************************************************* ** ** Function BTA_GATTC_Broadcast ** ** Description Start broadcasting (non-connectable advertisements) ** ** Parameters client_if: client interface. ** start: to start or stop listening for connection ** ** Returns void ** *******************************************************************************/ BTA_API extern void BTA_GATTC_Broadcast(tBTA_GATTC_IF client_if, BOOLEAN start); /******************************************************************************* ** BTA GATT Server API ********************************************************************************/ Loading Loading
system/bta/gatt/bta_gattc_act.c +22 −0 Original line number Diff line number Diff line Loading @@ -2128,5 +2128,27 @@ void bta_gattc_listen(tBTA_GATTC_CB *p_cb, tBTA_GATTC_DATA * p_msg) } } } /******************************************************************************* ** ** Function bta_gattc_broadcast ** ** Description Start or stop broadcasting ** ** Returns void ** ********************************************************************************/ void bta_gattc_broadcast(tBTA_GATTC_CB *p_cb, tBTA_GATTC_DATA * p_msg) { tBTA_GATTC_RCB *p_clreg = bta_gattc_cl_get_regcb(p_msg->api_listen.client_if); tBTA_GATTC cb_data; (void)(p_cb); cb_data.reg_oper.client_if = p_msg->api_listen.client_if; cb_data.reg_oper.status = BTM_BleBroadcast(p_msg->api_listen.start); if (p_clreg && p_clreg->p_cback) (*p_clreg->p_cback)(BTA_GATTC_LISTEN_EVT, &cb_data); } #endif #endif
system/bta/gatt/bta_gattc_api.c +26 −0 Original line number Diff line number Diff line Loading @@ -1056,5 +1056,31 @@ void BTA_GATTC_Listen(tBTA_GATTC_IF client_if, BOOLEAN start, BD_ADDR_PTR target return; } /******************************************************************************* ** ** Function BTA_GATTC_Broadcast ** ** Description Start broadcasting (non-connectable advertisements) ** ** Parameters client_if: client interface. ** start: to start or stop listening for connection ** ** Returns void ** *******************************************************************************/ void BTA_GATTC_Broadcast(tBTA_GATTC_IF client_if, BOOLEAN start) { tBTA_GATTC_API_LISTEN *p_buf; if ((p_buf = (tBTA_GATTC_API_LISTEN *) GKI_getbuf((UINT16)(sizeof(tBTA_GATTC_API_LISTEN) + BD_ADDR_LEN))) != NULL) { p_buf->hdr.event = BTA_GATTC_API_BROADCAST_EVT; p_buf->client_if = client_if; p_buf->start = start; bta_sys_sendmsg(p_buf); } return; } #endif /* BTA_GATT_INCLUDED */
system/bta/gatt/bta_gattc_int.h +2 −0 Original line number Diff line number Diff line Loading @@ -69,6 +69,7 @@ enum BTA_GATTC_API_REG_EVT, BTA_GATTC_API_DEREG_EVT, BTA_GATTC_API_LISTEN_EVT, BTA_GATTC_API_BROADCAST_EVT, BTA_GATTC_API_DISABLE_EVT, BTA_GATTC_ENC_CMPL_EVT }; Loading Loading @@ -484,6 +485,7 @@ extern void bta_gattc_send_open_cback( tBTA_GATTC_RCB *p_clreg, tBTA_GATT_STATUS extern void bta_gattc_process_api_refresh(tBTA_GATTC_CB *p_cb, tBTA_GATTC_DATA * p_msg); #if BLE_INCLUDED == TRUE extern void bta_gattc_listen(tBTA_GATTC_CB *p_cb, tBTA_GATTC_DATA * p_msg); extern void bta_gattc_broadcast(tBTA_GATTC_CB *p_cb, tBTA_GATTC_DATA * p_msg); #endif /* utility functions */ extern tBTA_GATTC_CLCB * bta_gattc_find_clcb_by_cif (UINT8 client_if, BD_ADDR remote_bda); Loading
system/bta/gatt/bta_gattc_main.c +3 −0 Original line number Diff line number Diff line Loading @@ -385,6 +385,9 @@ BOOLEAN bta_gattc_hdl_event(BT_HDR *p_msg) case BTA_GATTC_API_LISTEN_EVT: bta_gattc_listen(p_cb, (tBTA_GATTC_DATA *) p_msg); break; case BTA_GATTC_API_BROADCAST_EVT: bta_gattc_broadcast(p_cb, (tBTA_GATTC_DATA *) p_msg); break; #endif case BTA_GATTC_ENC_CMPL_EVT: Loading
system/bta/include/bta_gatt_api.h +15 −0 Original line number Diff line number Diff line Loading @@ -1030,6 +1030,21 @@ BTA_API extern void BTA_GATTC_Refresh(BD_ADDR remote_bda); *******************************************************************************/ BTA_API extern void BTA_GATTC_Listen(tBTA_GATTC_IF client_if, BOOLEAN start, BD_ADDR_PTR target_bda); /******************************************************************************* ** ** Function BTA_GATTC_Broadcast ** ** Description Start broadcasting (non-connectable advertisements) ** ** Parameters client_if: client interface. ** start: to start or stop listening for connection ** ** Returns void ** *******************************************************************************/ BTA_API extern void BTA_GATTC_Broadcast(tBTA_GATTC_IF client_if, BOOLEAN start); /******************************************************************************* ** BTA GATT Server API ********************************************************************************/ Loading