• 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/bt_hdr.h"
23 #include "types/ble_address_with_type.h"
24 #include "types/raw_address.h"
25 
26 // This header contains functions for L2cap-ACL to invoke
27 //
28 void acl_accept_connection_request(const RawAddress& bd_addr, uint8_t role);
29 void acl_create_classic_connection(const RawAddress& bd_addr,
30                                    bool there_are_high_priority_channels,
31                                    bool is_bonding);
32 bool acl_create_le_connection(const RawAddress& bd_addr);
33 bool acl_create_le_connection_with_id(uint8_t id, const RawAddress& bd_addr);
34 bool acl_create_le_connection_with_id(uint8_t id, const RawAddress& bd_addr,
35                                       tBLE_ADDR_TYPE addr_type);
36 void acl_reject_connection_request(const RawAddress& bd_addr, uint8_t reason);
37 void acl_send_data_packet_br_edr(const RawAddress& bd_addr, BT_HDR* p_buf);
38 void acl_send_data_packet_ble(const RawAddress& bd_addr, BT_HDR* p_buf);
39 void acl_write_automatic_flush_timeout(const RawAddress& bd_addr,
40                                        uint16_t flush_timeout);
41 
42 // ACL data received from HCI-ACL
43 void l2c_rcv_acl_data(BT_HDR* p_msg);
44 
45 // Segments is sent to HCI-ACL
46 void l2c_link_segments_xmitted(BT_HDR* p_msg);
47 
48 void l2c_link_hci_conn_req(const RawAddress& bd_addr);
49 
50 void l2cu_resubmit_pending_sec_req(const RawAddress* p_bda);
51 
52 void l2c_packets_completed(uint16_t handle, uint16_t num_sent);
53