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:13
20 */
21
22 #include <map>
23 #include <string>
24
25 extern std::map<std::string, int> mock_function_count_map;
26
27 #include <base/strings/stringprintf.h>
28 #include <string.h>
29 #include "bt_target.h"
30 #include "device/include/controller.h"
31 #include "gap_api.h"
32 #include "l2c_api.h"
33 #include "l2cdefs.h"
34 #include "osi/include/fixed_queue.h"
35 #include "osi/include/mutex.h"
36 #include "stack/btm/btm_sec.h"
37
38 #ifndef UNUSED_ATTR
39 #define UNUSED_ATTR
40 #endif
41
GAP_ConnGetRemoteAddr(uint16_t gap_handle)42 const RawAddress* GAP_ConnGetRemoteAddr(uint16_t gap_handle) {
43 mock_function_count_map[__func__]++;
44 return nullptr;
45 }
GAP_GetRxQueueCnt(uint16_t handle,uint32_t * p_rx_queue_count)46 int GAP_GetRxQueueCnt(uint16_t handle, uint32_t* p_rx_queue_count) {
47 mock_function_count_map[__func__]++;
48 return 0;
49 }
GAP_ConnClose(uint16_t gap_handle)50 uint16_t GAP_ConnClose(uint16_t gap_handle) {
51 mock_function_count_map[__func__]++;
52 return 0;
53 }
GAP_ConnGetL2CAPCid(uint16_t gap_handle)54 uint16_t GAP_ConnGetL2CAPCid(uint16_t gap_handle) {
55 mock_function_count_map[__func__]++;
56 return 0;
57 }
GAP_ConnGetRemMtuSize(uint16_t gap_handle)58 uint16_t GAP_ConnGetRemMtuSize(uint16_t gap_handle) {
59 mock_function_count_map[__func__]++;
60 return 0;
61 }
GAP_ConnOpen(const char * p_serv_name,uint8_t service_id,bool is_server,const RawAddress * p_rem_bda,uint16_t psm,uint16_t le_mps,tL2CAP_CFG_INFO * p_cfg,tL2CAP_ERTM_INFO * ertm_info,uint16_t security,tGAP_CONN_CALLBACK * p_cb,tBT_TRANSPORT transport)62 uint16_t GAP_ConnOpen(const char* p_serv_name, uint8_t service_id,
63 bool is_server, const RawAddress* p_rem_bda, uint16_t psm,
64 uint16_t le_mps, tL2CAP_CFG_INFO* p_cfg,
65 tL2CAP_ERTM_INFO* ertm_info, uint16_t security,
66 tGAP_CONN_CALLBACK* p_cb, tBT_TRANSPORT transport) {
67 mock_function_count_map[__func__]++;
68 return 0;
69 }
GAP_ConnReadData(uint16_t gap_handle,uint8_t * p_data,uint16_t max_len,uint16_t * p_len)70 uint16_t GAP_ConnReadData(uint16_t gap_handle, uint8_t* p_data,
71 uint16_t max_len, uint16_t* p_len) {
72 mock_function_count_map[__func__]++;
73 return 0;
74 }
GAP_ConnWriteData(uint16_t gap_handle,BT_HDR * msg)75 uint16_t GAP_ConnWriteData(uint16_t gap_handle, BT_HDR* msg) {
76 mock_function_count_map[__func__]++;
77 return 0;
78 }
GAP_Init(void)79 void GAP_Init(void) { mock_function_count_map[__func__]++; }
gap_tx_complete_ind(uint16_t l2cap_cid,uint16_t sdu_sent)80 void gap_tx_complete_ind(uint16_t l2cap_cid, uint16_t sdu_sent) {
81 mock_function_count_map[__func__]++;
82 }
83