Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 934ccb59 authored by Chris Manton's avatar Chris Manton
Browse files

Use for gatt types/bt_transport

Bug: 163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: If48b9ac9f27312c81864d0edd287efeacb76c9ee
parent 6b03bc40
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -4004,11 +4004,11 @@ void btm_dm_start_gatt_discovery(const RawAddress& bd_addr) {
    btm_dm_start_disc_gatt_services(bta_dm_search_cb.conn_id);
  } else {
    if (BTM_IsAclConnectionUp(bd_addr, BT_TRANSPORT_LE)) {
      BTA_GATTC_Open(bta_dm_search_cb.client_if, bd_addr, true,
                     GATT_TRANSPORT_LE, true);
      BTA_GATTC_Open(bta_dm_search_cb.client_if, bd_addr, true, BT_TRANSPORT_LE,
                     true);
    } else {
      BTA_GATTC_Open(bta_dm_search_cb.client_if, bd_addr, true,
                     GATT_TRANSPORT_LE, false);
      BTA_GATTC_Open(bta_dm_search_cb.client_if, bd_addr, true, BT_TRANSPORT_LE,
                     false);
    }
  }
}
+3 −3
Original line number Diff line number Diff line
@@ -119,7 +119,7 @@ void BTA_GATTC_AppDeregister(tGATT_IF client_if) {
 *
 ******************************************************************************/
void BTA_GATTC_Open(tGATT_IF client_if, const RawAddress& remote_bda,
                    bool is_direct, tGATT_TRANSPORT transport,
                    bool is_direct, tBT_TRANSPORT transport,
                    bool opportunistic) {
  uint8_t phy = controller_get_interface()->get_le_all_initiating_phys();
  BTA_GATTC_Open(client_if, remote_bda, is_direct, transport, opportunistic,
@@ -127,8 +127,8 @@ void BTA_GATTC_Open(tGATT_IF client_if, const RawAddress& remote_bda,
}

void BTA_GATTC_Open(tGATT_IF client_if, const RawAddress& remote_bda,
                    bool is_direct, tGATT_TRANSPORT transport,
                    bool opportunistic, uint8_t initiating_phys) {
                    bool is_direct, tBT_TRANSPORT transport, bool opportunistic,
                    uint8_t initiating_phys) {
  tBTA_GATTC_API_OPEN* p_buf =
      (tBTA_GATTC_API_OPEN*)osi_malloc(sizeof(tBTA_GATTC_API_OPEN));

+1 −1
Original line number Diff line number Diff line
@@ -370,7 +370,7 @@ void bta_gattc_clear_notif_registration(tBTA_GATTC_SERV* p_srcb,
  tGATT_IF gatt_if;
  tBTA_GATTC_RCB* p_clrcb;
  uint8_t i;
  tGATT_TRANSPORT transport;
  tBT_TRANSPORT transport;
  uint16_t handle;

  if (GATT_GetConnectionInfor(conn_id, &gatt_if, remote_bda, &transport)) {
+5 −5
Original line number Diff line number Diff line
@@ -48,7 +48,7 @@ static bool bta_gatts_nv_srv_chg_cback(tGATTS_SRV_CHG_CMD cmd,
static void bta_gatts_conn_cback(tGATT_IF gatt_if, const RawAddress& bda,
                                 uint16_t conn_id, bool connected,
                                 tGATT_DISCONN_REASON reason,
                                 tGATT_TRANSPORT transport);
                                 tBT_TRANSPORT transport);
static void bta_gatts_send_request_cback(uint16_t conn_id, uint32_t trans_id,
                                         tGATTS_REQ_TYPE req_type,
                                         tGATTS_DATA* p_data);
@@ -501,7 +501,7 @@ void bta_gatts_close(UNUSED_ATTR tBTA_GATTS_CB* p_cb, tBTA_GATTS_DATA* p_msg) {
  tGATT_STATUS status = GATT_ERROR;
  tGATT_IF gatt_if;
  RawAddress remote_bda;
  tGATT_TRANSPORT transport;
  tBT_TRANSPORT transport;

  if (GATT_GetConnectionInfor(p_msg->hdr.layer_specific, &gatt_if, remote_bda,
                              &transport)) {
@@ -542,7 +542,7 @@ static void bta_gatts_send_request_cback(uint16_t conn_id, uint32_t trans_id,
  tBTA_GATTS cb_data;
  tBTA_GATTS_RCB* p_rcb;
  tGATT_IF gatt_if;
  tGATT_TRANSPORT transport;
  tBT_TRANSPORT transport;

  memset(&cb_data, 0, sizeof(tBTA_GATTS));

@@ -586,7 +586,7 @@ static void bta_gatts_send_request_cback(uint16_t conn_id, uint32_t trans_id,
static void bta_gatts_conn_cback(tGATT_IF gatt_if, const RawAddress& bdaddr,
                                 uint16_t conn_id, bool connected,
                                 tGATT_DISCONN_REASON reason,
                                 tGATT_TRANSPORT transport) {
                                 tBT_TRANSPORT transport) {
  tBTA_GATTS cb_data;
  uint8_t evt = connected ? BTA_GATTS_CONNECT_EVT : BTA_GATTS_DISCONNECT_EVT;
  tBTA_GATTS_RCB* p_reg;
@@ -671,7 +671,7 @@ static void bta_gatts_conn_update_cback(tGATT_IF gatt_if, uint16_t conn_id,
static void bta_gatts_cong_cback(uint16_t conn_id, bool congested) {
  tBTA_GATTS_RCB* p_rcb;
  tGATT_IF gatt_if;
  tGATT_TRANSPORT transport;
  tBT_TRANSPORT transport;
  tBTA_GATTS cb_data;

  if (GATT_GetConnectionInfor(conn_id, &gatt_if, cb_data.req_data.remote_bda,
+1 −1
Original line number Diff line number Diff line
@@ -298,7 +298,7 @@ void BTA_GATTS_SendRsp(uint16_t conn_id, uint32_t trans_id, tGATT_STATUS status,
 *
 ******************************************************************************/
void BTA_GATTS_Open(tGATT_IF server_if, const RawAddress& remote_bda,
                    bool is_direct, tGATT_TRANSPORT transport) {
                    bool is_direct, tBT_TRANSPORT transport) {
  tBTA_GATTS_API_OPEN* p_buf =
      (tBTA_GATTS_API_OPEN*)osi_malloc(sizeof(tBTA_GATTS_API_OPEN));

Loading