• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 bool btm_is_sco_active(uint16_t handle);
29 extern void btm_sco_chk_pend_unpark(tHCI_STATUS hci_status,
30                                     uint16_t hci_handle);
31 extern void btm_sco_conn_req(const RawAddress& bda, const DEV_CLASS& dev_class,
32                              uint8_t link_type);
33 extern void btm_sco_connected(const RawAddress& bda, uint16_t hci_handle,
34                               tBTM_ESCO_DATA* p_esco_data);
35 extern void btm_sco_connection_failed(tHCI_STATUS hci_status,
36                                       const RawAddress& bda,
37                                       uint16_t hci_handle,
38                                       tBTM_ESCO_DATA* p_esco_data);
39 extern bool btm_sco_removed(uint16_t hci_handle, tHCI_REASON reason);
40 
41 void btm_sco_on_disconnected(uint16_t hci_handle, tHCI_REASON reason);
42 void btm_sco_on_esco_connect_request(const RawAddress&,
43                                      const bluetooth::types::ClassOfDevice&);
44 void btm_sco_on_sco_connect_request(const RawAddress&,
45                                     const bluetooth::types::ClassOfDevice&);
46