1 /*
2  * Copyright 2021 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  * Generated mock file from original source file
19  *   Functions generated:14
20  */
21 
22 #include <cstdint>
23 #include <map>
24 #include <string>
25 
26 extern std::map<std::string, int> mock_function_count_map;
27 
28 #include "stack/gatt/gatt_int.h"
29 #include "types/bt_transport.h"
30 #include "types/raw_address.h"
31 
32 #ifndef UNUSED_ATTR
33 #define UNUSED_ATTR
34 #endif
35 
gatt_profile_find_conn_id_by_bd_addr(const RawAddress & remote_bda)36 uint16_t gatt_profile_find_conn_id_by_bd_addr(const RawAddress& remote_bda) {
37   mock_function_count_map[__func__]++;
38   return 0;
39 }
gatt_profile_get_eatt_support(const RawAddress & remote_bda,base::OnceCallback<void (const RawAddress &,bool)> cb)40 bool gatt_profile_get_eatt_support(
41     const RawAddress& remote_bda,
42     base::OnceCallback<void(const RawAddress&, bool)> cb) {
43   mock_function_count_map[__func__]++;
44   return false;
45 }
gatt_sr_is_cl_change_aware(tGATT_TCB & tcb)46 bool gatt_sr_is_cl_change_aware(tGATT_TCB& tcb) {
47   mock_function_count_map[__func__]++;
48   return false;
49 }
gatt_profile_clcb_alloc(uint16_t conn_id,const RawAddress & bda,tBT_TRANSPORT tranport)50 tGATT_PROFILE_CLCB* gatt_profile_clcb_alloc(uint16_t conn_id,
51                                             const RawAddress& bda,
52                                             tBT_TRANSPORT tranport) {
53   mock_function_count_map[__func__]++;
54   return nullptr;
55 }
proc_read_req(uint16_t conn_id,tGATTS_REQ_TYPE,tGATT_READ_REQ * p_data,tGATTS_RSP * p_rsp)56 tGATT_STATUS proc_read_req(uint16_t conn_id, tGATTS_REQ_TYPE,
57                            tGATT_READ_REQ* p_data, tGATTS_RSP* p_rsp) {
58   mock_function_count_map[__func__]++;
59   return GATT_SUCCESS;
60 }
proc_write_req(uint16_t conn_id,tGATTS_REQ_TYPE,tGATT_WRITE_REQ * p_data)61 tGATT_STATUS proc_write_req(uint16_t conn_id, tGATTS_REQ_TYPE,
62                             tGATT_WRITE_REQ* p_data) {
63   mock_function_count_map[__func__]++;
64   return GATT_SUCCESS;
65 }
read_attr_value(uint16_t conn_id,uint16_t handle,tGATT_VALUE * p_value,bool is_long)66 tGATT_STATUS read_attr_value(uint16_t conn_id, uint16_t handle,
67                              tGATT_VALUE* p_value, bool is_long) {
68   mock_function_count_map[__func__]++;
69   return GATT_SUCCESS;
70 }
GATT_ConfigServiceChangeCCC(const RawAddress & remote_bda,bool enable,tBT_TRANSPORT transport)71 void GATT_ConfigServiceChangeCCC(const RawAddress& remote_bda, bool enable,
72                                  tBT_TRANSPORT transport) {
73   mock_function_count_map[__func__]++;
74 }
gatt_profile_clcb_dealloc(tGATT_PROFILE_CLCB * p_clcb)75 void gatt_profile_clcb_dealloc(tGATT_PROFILE_CLCB* p_clcb) {
76   mock_function_count_map[__func__]++;
77 }
gatt_profile_db_init(void)78 void gatt_profile_db_init(void) { mock_function_count_map[__func__]++; }
gatt_sr_init_cl_status(tGATT_TCB & tcb)79 void gatt_sr_init_cl_status(tGATT_TCB& tcb) {
80   mock_function_count_map[__func__]++;
81 }
gatt_sr_update_cl_status(tGATT_TCB & tcb,bool chg_aware)82 void gatt_sr_update_cl_status(tGATT_TCB& tcb, bool chg_aware) {
83   mock_function_count_map[__func__]++;
84 }
85