From 6d030597139f36390e38687bfda034e5c71ef237 Mon Sep 17 00:00:00 2001 From: Chris Manton Date: Mon, 7 Sep 2020 22:53:25 -0700 Subject: [PATCH] Add btm_dev and btm_sco hci links Towards readable code Bug: 163134718 Tag: #refactor Test: compile & verify basic functions working Change-Id: Idf49d35eaf6a994c5e8904e9d657f5f144707d27 --- stack/btu/btu_hcif.cc | 3 +++ stack/include/dev_hci_link_interface.h | 30 +++++++++++++++++++++++++++++ stack/include/sco_hci_link_interface.h | 35 ++++++++++++++++++++++++++++++++++ 3 files changed, 68 insertions(+) create mode 100644 stack/include/dev_hci_link_interface.h create mode 100644 stack/include/sco_hci_link_interface.h diff --git a/stack/btu/btu_hcif.cc b/stack/btu/btu_hcif.cc index 93513aeb4..89ae7a29e 100644 --- a/stack/btu/btu_hcif.cc +++ b/stack/btu/btu_hcif.cc @@ -40,9 +40,12 @@ #include "stack/include/ble_hci_link_interface.h" #include "stack/include/btm_iso_api.h" #include "stack/include/btu.h" +#include "stack/include/dev_hci_link_interface.h" #include "stack/include/hci_evt_length.h" #include "stack/include/hcidefs.h" +#include "stack/include/inq_hci_link_interface.h" #include "stack/include/l2cap_hci_link_interface.h" +#include "stack/include/sco_hci_link_interface.h" #include "stack/include/sec_hci_link_interface.h" using base::Location; diff --git a/stack/include/dev_hci_link_interface.h b/stack/include/dev_hci_link_interface.h new file mode 100644 index 000000000..4ac6fbb23 --- /dev/null +++ b/stack/include/dev_hci_link_interface.h @@ -0,0 +1,30 @@ +/* + * Copyright 2020 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#pragma once + +#include + +#include + +#include "types/raw_address.h" + +extern void btm_delete_stored_link_key_complete(uint8_t* p); +extern void btm_vendor_specific_evt(uint8_t* p, uint8_t evt_len); +extern void btm_vsc_complete(uint8_t* p, uint16_t cc_opcode, uint16_t evt_len, + tBTM_VSC_CMPL_CB* p_vsc_cplt_cback); +extern void btm_read_local_name_complete(uint8_t* p, uint16_t evt_len); diff --git a/stack/include/sco_hci_link_interface.h b/stack/include/sco_hci_link_interface.h new file mode 100644 index 000000000..83c5ee939 --- /dev/null +++ b/stack/include/sco_hci_link_interface.h @@ -0,0 +1,35 @@ +/* + * Copyright 2020 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#pragma once + +#include + +#include + +#include "types/raw_address.h" + +extern void btm_esco_proc_conn_chg(uint8_t status, uint16_t handle, + uint8_t tx_interval, uint8_t retrans_window, + uint16_t rx_pkt_len, uint16_t tx_pkt_len); +extern bool btm_is_sco_active(uint16_t handle); +extern void btm_sco_chk_pend_unpark(uint8_t hci_status, uint16_t hci_handle); +extern void btm_sco_conn_req(const RawAddress& bda, DEV_CLASS dev_class, + uint8_t link_type); +extern void btm_sco_connected(uint8_t hci_status, const RawAddress* bda, + uint16_t hci_handle, tBTM_ESCO_DATA* p_esco_data); +extern bool btm_sco_removed(uint16_t hci_handle, uint8_t reason); -- 2.11.0