1 /*
2  *  Copyright 2020 The Android Open Source Project
3  *
4  *  Licensed under the Apache License, Version 2.0 (the "License");
5  *  you may not use this file except in compliance with the License.
6  *  You may obtain a copy of the License at:
7  *
8  *  http://www.apache.org/licenses/LICENSE-2.0
9  *
10  *  Unless required by applicable law or agreed to in writing, software
11  *  distributed under the License is distributed on an "AS IS" BASIS,
12  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  *  See the License for the specific language governing permissions and
14  *  limitations under the License.
15  *
16  */
17 
18 #pragma once
19 
20 #include <cstdint>
21 
22 #include "stack/include/hci_error_code.h"
23 #include "types/class_of_device.h"
24 #include "types/raw_address.h"
25 
26 struct tBTM_ESCO_DATA;
27 
28 extern void btm_esco_proc_conn_chg(uint8_t status, uint16_t handle,
29                                    uint8_t tx_interval, uint8_t retrans_window,
30                                    uint16_t rx_pkt_len, uint16_t tx_pkt_len);
31 extern bool btm_is_sco_active(uint16_t handle);
32 extern void btm_sco_chk_pend_unpark(tHCI_STATUS hci_status,
33                                     uint16_t hci_handle);
34 extern void btm_sco_conn_req(const RawAddress& bda, const DEV_CLASS& dev_class,
35                              uint8_t link_type);
36 extern void btm_sco_connected(tHCI_STATUS hci_status, const RawAddress& bda,
37                               uint16_t hci_handle, tBTM_ESCO_DATA* p_esco_data);
38 extern bool btm_sco_removed(uint16_t hci_handle, tHCI_REASON reason);
39 
40 void btm_sco_on_disconnected(uint16_t hci_handle, tHCI_REASON reason);
41 void btm_sco_on_esco_connect_request(const RawAddress&,
42                                      const bluetooth::types::ClassOfDevice&);
43 void btm_sco_on_sco_connect_request(const RawAddress&,
44                                     const bluetooth::types::ClassOfDevice&);
45