OSDN Git Service

Add btm_dev and btm_sco hci links
authorChris Manton <cmanton@google.com>
Tue, 8 Sep 2020 05:53:25 +0000 (22:53 -0700)
committerChris Manton <cmanton@google.com>
Mon, 14 Sep 2020 05:37:58 +0000 (05:37 +0000)
Towards readable code

Bug: 163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Idf49d35eaf6a994c5e8904e9d657f5f144707d27

stack/btu/btu_hcif.cc
stack/include/dev_hci_link_interface.h [new file with mode: 0644]
stack/include/sco_hci_link_interface.h [new file with mode: 0644]

index 93513ae..89ae7a2 100644 (file)
 #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 (file)
index 0000000..4ac6fbb
--- /dev/null
@@ -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 <cstdint>
+
+#include <cstdint>
+
+#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 (file)
index 0000000..83c5ee9
--- /dev/null
@@ -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 <cstdint>
+
+#include <cstdint>
+
+#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);