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 #include "stack/gatt/gatt_int.h"
18 #include "utils/include/bt_utils.h"
19 
20 /** stack/btm/btm_ble.cc*/
btm_ble_read_sec_key_size(const RawAddress & bd_addr)21 uint8_t btm_ble_read_sec_key_size(const RawAddress& bd_addr) { return 0; }
BTM_GetSecurityFlagsByTransport(const RawAddress & bd_addr,uint8_t * p_sec_flags,tBT_TRANSPORT transport)22 bool BTM_GetSecurityFlagsByTransport(const RawAddress& bd_addr,
23                                      uint8_t* p_sec_flags,
24                                      tBT_TRANSPORT transport) {
25   return false;
26 }
27 
28 /** stack/btu/btu_task.cc, indirect reference, gatt_utils.cc -> libosi */
get_main_thread()29 bluetooth::common::MessageLoopThread* get_main_thread() { return nullptr; }
30 
31 /** stack/gatt/connection_manager.cc */
32 namespace connection_manager {
background_connect_remove(uint8_t app_id,const RawAddress & address)33 bool background_connect_remove(uint8_t app_id, const RawAddress& address) {
34   return false;
35 }
direct_connect_remove(uint8_t app_id,const RawAddress & address)36 bool direct_connect_remove(uint8_t app_id, const RawAddress& address) {
37   return false;
38 }
39 }  // namespace connection_manager
40 
41 /** stack/gatt/att_protocol.cc */
attp_build_sr_msg(tGATT_TCB & tcb,uint8_t op_code,tGATT_SR_MSG * p_msg)42 BT_HDR* attp_build_sr_msg(tGATT_TCB& tcb, uint8_t op_code,
43                           tGATT_SR_MSG* p_msg) {
44   return nullptr;
45 }
attp_send_cl_confirmation_msg(tGATT_TCB & tcb,uint16_t cid)46 tGATT_STATUS attp_send_cl_confirmation_msg(tGATT_TCB& tcb, uint16_t cid) {
47   return GATT_SUCCESS;
48 }
attp_send_cl_msg(tGATT_TCB & tcb,tGATT_CLCB * p_clcb,uint8_t op_code,tGATT_CL_MSG * p_msg)49 tGATT_STATUS attp_send_cl_msg(tGATT_TCB& tcb, tGATT_CLCB* p_clcb,
50                               uint8_t op_code, tGATT_CL_MSG* p_msg) {
51   return GATT_SUCCESS;
52 }
attp_send_sr_msg(tGATT_TCB & tcb,uint16_t cid,BT_HDR * p_msg)53 tGATT_STATUS attp_send_sr_msg(tGATT_TCB& tcb, uint16_t cid, BT_HDR* p_msg) {
54   return GATT_SUCCESS;
55 }
56 
57 /** stack/gatt/gatt_attr.cc */
gatt_sr_init_cl_status(tGATT_TCB & tcb)58 void gatt_sr_init_cl_status(tGATT_TCB& tcb) {}
59 
60 /** stack/gatt/gatt_cl.cc */
gatt_act_discovery(tGATT_CLCB * p_clcb)61 void gatt_act_discovery(tGATT_CLCB* p_clcb) {}
62 
63 /** stack/gatt/gatt_main.cc */
gatt_update_app_use_link_flag(tGATT_IF gatt_if,tGATT_TCB * p_tcb,bool is_add,bool check_acl_link)64 void gatt_update_app_use_link_flag(tGATT_IF gatt_if, tGATT_TCB* p_tcb,
65                                    bool is_add, bool check_acl_link) {}
gatts_proc_srv_chg_ind_ack(tGATT_TCB)66 void gatts_proc_srv_chg_ind_ack(tGATT_TCB) {}
gatt_disconnect(tGATT_TCB * p_tcb)67 bool gatt_disconnect(tGATT_TCB* p_tcb) { return false; }
gatt_get_ch_state(tGATT_TCB * p_tcb)68 tGATT_CH_STATE gatt_get_ch_state(tGATT_TCB* p_tcb) { return GATT_CH_CLOSE; }
gatt_set_ch_state(tGATT_TCB * p_tcb,tGATT_CH_STATE ch_state)69 void gatt_set_ch_state(tGATT_TCB* p_tcb, tGATT_CH_STATE ch_state) {}
70 
71 /** stack/gatt/gatt_sr.cc */
gatt_sr_enqueue_cmd(tGATT_TCB & tcb,uint16_t cid,uint8_t op_code,uint16_t handle)72 uint32_t gatt_sr_enqueue_cmd(tGATT_TCB& tcb, uint16_t cid, uint8_t op_code,
73                              uint16_t handle) { return 0x0000; }
gatt_dequeue_sr_cmd(tGATT_TCB & tcb,uint16_t cid)74 void gatt_dequeue_sr_cmd(tGATT_TCB& tcb, uint16_t cid) {}
75 
76 
77 /** stack/l2cap/l2c_ble.cc */
l2cble_set_fixed_channel_tx_data_length(const RawAddress & remote_bda,uint16_t fix_cid,uint16_t tx_mtu)78 void l2cble_set_fixed_channel_tx_data_length(const RawAddress& remote_bda,
79                                              uint16_t fix_cid,
80                                              uint16_t tx_mtu) {}
L2CA_SetLeFixedChannelTxDataLength(const RawAddress & remote_bda,uint16_t fix_cid,uint16_t tx_mtu)81 void L2CA_SetLeFixedChannelTxDataLength(const RawAddress& remote_bda,
82                                         uint16_t fix_cid,
83                                         uint16_t tx_mtu) {}
84 /** stack/sdp/sdp_db.cc */
SDP_AddAttribute(uint32_t handle,uint16_t attr_id,uint8_t attr_type,uint32_t attr_len,uint8_t * p_val)85 bool SDP_AddAttribute(uint32_t handle, uint16_t attr_id, uint8_t attr_type,
86                       uint32_t attr_len, uint8_t* p_val) {
87   return false;
88 }
SDP_AddProtocolList(uint32_t handle,uint16_t num_elem,tSDP_PROTOCOL_ELEM * p_elem_list)89 bool SDP_AddProtocolList(uint32_t handle, uint16_t num_elem,
90                          tSDP_PROTOCOL_ELEM* p_elem_list) {
91   return false;
92 }
SDP_AddServiceClassIdList(uint32_t handle,uint16_t num_services,uint16_t * p_service_uuids)93 bool SDP_AddServiceClassIdList(uint32_t handle, uint16_t num_services,
94                                uint16_t* p_service_uuids) {
95   return false;
96 }
SDP_AddUuidSequence(uint32_t handle,uint16_t attr_id,uint16_t num_uuids,uint16_t * p_uuids)97 bool SDP_AddUuidSequence(uint32_t handle, uint16_t attr_id, uint16_t num_uuids,
98                          uint16_t* p_uuids) {
99   return false;
100 }
SDP_CreateRecord(void)101 uint32_t SDP_CreateRecord(void) { return 0; }
102 
103