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 "stack/include/bt_hdr.h"
19 #include "types/raw_address.h"
20 
21 // TODO(b/369381361) Enfore -Wmissing-prototypes
22 #pragma GCC diagnostic ignored "-Wmissing-prototypes"
23 #pragma GCC diagnostic ignored "-Wunused-parameter"
24 
25 /** stack/connection_manager/connection_manager.cc */
26 namespace connection_manager {
background_connect_remove(uint8_t app_id,const RawAddress & address)27 bool background_connect_remove(uint8_t app_id, const RawAddress& address) { return false; }
direct_connect_remove(uint8_t app_id,const RawAddress & address,bool connection_timeout)28 bool direct_connect_remove(uint8_t app_id, const RawAddress& address, bool connection_timeout) {
29   return false;
30 }
is_background_connection(const RawAddress & address)31 bool is_background_connection(const RawAddress& address) { return false; }
32 }  // namespace connection_manager
33 
34 /** stack/gatt/att_protocol.cc */
attp_build_sr_msg(tGATT_TCB & tcb,uint8_t op_code,tGATT_SR_MSG * p_msg,uint16_t payload_size)35 BT_HDR* attp_build_sr_msg(tGATT_TCB& tcb, uint8_t op_code, tGATT_SR_MSG* p_msg,
36                           uint16_t payload_size) {
37   return nullptr;
38 }
attp_send_cl_confirmation_msg(tGATT_TCB & tcb,uint16_t cid)39 tGATT_STATUS attp_send_cl_confirmation_msg(tGATT_TCB& tcb, uint16_t cid) { return GATT_SUCCESS; }
attp_send_cl_msg(tGATT_TCB & tcb,tGATT_CLCB * p_clcb,uint8_t op_code,tGATT_CL_MSG * p_msg)40 tGATT_STATUS attp_send_cl_msg(tGATT_TCB& tcb, tGATT_CLCB* p_clcb, uint8_t op_code,
41                               tGATT_CL_MSG* p_msg) {
42   return GATT_SUCCESS;
43 }
attp_send_sr_msg(tGATT_TCB & tcb,uint16_t cid,BT_HDR * p_msg)44 tGATT_STATUS attp_send_sr_msg(tGATT_TCB& tcb, uint16_t cid, BT_HDR* p_msg) { return GATT_SUCCESS; }
45 
46 /** stack/gatt/gatt_attr.cc */
gatt_sr_init_cl_status(tGATT_TCB & tcb)47 void gatt_sr_init_cl_status(tGATT_TCB& tcb) {}
48 
49 /** stack/gatt/gatt_cl.cc */
gatt_act_discovery(tGATT_CLCB * p_clcb)50 void gatt_act_discovery(tGATT_CLCB* p_clcb) {}
51 
52 /** 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)53 void gatt_update_app_use_link_flag(tGATT_IF gatt_if, tGATT_TCB* p_tcb, bool is_add,
54                                    bool check_acl_link) {}
gatts_proc_srv_chg_ind_ack(tGATT_TCB)55 void gatts_proc_srv_chg_ind_ack(tGATT_TCB) {}
gatt_disconnect(tGATT_TCB * p_tcb)56 bool gatt_disconnect(tGATT_TCB* p_tcb) { return false; }
gatt_cancel_connect(const RawAddress & bd_addr,tBT_TRANSPORT transport)57 void gatt_cancel_connect(const RawAddress& bd_addr, tBT_TRANSPORT transport) {}
gatt_get_ch_state(tGATT_TCB * p_tcb)58 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)59 void gatt_set_ch_state(tGATT_TCB* p_tcb, tGATT_CH_STATE ch_state) {}
60 
61 /** stack/gatt/gatt_sr.cc */
gatt_sr_enqueue_cmd(tGATT_TCB & tcb,uint16_t cid,uint8_t op_code,uint16_t handle)62 uint32_t gatt_sr_enqueue_cmd(tGATT_TCB& tcb, uint16_t cid, uint8_t op_code, uint16_t handle) {
63   return 0x0000;
64 }
gatt_dequeue_sr_cmd(tGATT_TCB & tcb,uint16_t cid)65 void gatt_dequeue_sr_cmd(tGATT_TCB& tcb, uint16_t cid) {}
66