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 "hci/class_of_device.h"
23 #include "stack/include/bt_dev_class.h"
24 #include "stack/include/hci_error_code.h"
25 #include "types/raw_address.h"
26 
27 struct tBTM_ESCO_DATA;
28 
29 void btm_sco_chk_pend_unpark(tHCI_STATUS hci_status, uint16_t hci_handle);
30 void btm_sco_conn_req(const RawAddress& bda, const DEV_CLASS& dev_class,
31                       uint8_t link_type);
32 void btm_sco_connected(const RawAddress& bda, uint16_t hci_handle,
33                        tBTM_ESCO_DATA* p_esco_data);
34 void btm_sco_connection_failed(tHCI_STATUS hci_status, const RawAddress& bda,
35                                uint16_t hci_handle,
36                                tBTM_ESCO_DATA* p_esco_data);
37 bool btm_sco_removed(uint16_t hci_handle, tHCI_REASON reason);
38 
39 void btm_sco_on_disconnected(uint16_t hci_handle, tHCI_REASON reason);
40 void btm_sco_on_esco_connect_request(const RawAddress&,
41                                      const bluetooth::hci::ClassOfDevice&);
42 void btm_sco_on_sco_connect_request(const RawAddress&,
43                                     const bluetooth::hci::ClassOfDevice&);
44