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:23
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/include/btm_api_types.h"
29 #include "stack/include/btm_status.h"
30 #include "stack/include/hci_error_code.h"
31 #include "types/class_of_device.h"
32 #include "types/raw_address.h"
33
34 #ifndef UNUSED_ATTR
35 #define UNUSED_ATTR
36 #endif
37
BTM_IsScoActiveByBdaddr(const RawAddress & remote_bda)38 bool BTM_IsScoActiveByBdaddr(const RawAddress& remote_bda) {
39 mock_function_count_map[__func__]++;
40 return false;
41 }
btm_is_sco_active(uint16_t handle)42 bool btm_is_sco_active(uint16_t handle) {
43 mock_function_count_map[__func__]++;
44 return false;
45 }
btm_sco_removed(uint16_t hci_handle,tHCI_REASON reason)46 bool btm_sco_removed(uint16_t hci_handle, tHCI_REASON reason) {
47 mock_function_count_map[__func__]++;
48 return false;
49 }
BTM_ReadScoBdAddr(uint16_t sco_inx)50 const RawAddress* BTM_ReadScoBdAddr(uint16_t sco_inx) {
51 mock_function_count_map[__func__]++;
52 return nullptr;
53 }
BTM_ChangeEScoLinkParms(uint16_t sco_inx,tBTM_CHG_ESCO_PARAMS * p_parms)54 tBTM_STATUS BTM_ChangeEScoLinkParms(uint16_t sco_inx,
55 tBTM_CHG_ESCO_PARAMS* p_parms) {
56 mock_function_count_map[__func__]++;
57 return BTM_SUCCESS;
58 }
BTM_CreateSco(const RawAddress * remote_bda,bool is_orig,uint16_t pkt_types,uint16_t * p_sco_inx,tBTM_SCO_CB * p_conn_cb,tBTM_SCO_CB * p_disc_cb)59 tBTM_STATUS BTM_CreateSco(const RawAddress* remote_bda, bool is_orig,
60 uint16_t pkt_types, uint16_t* p_sco_inx,
61 tBTM_SCO_CB* p_conn_cb, tBTM_SCO_CB* p_disc_cb) {
62 mock_function_count_map[__func__]++;
63 return BTM_SUCCESS;
64 }
BTM_RegForEScoEvts(uint16_t sco_inx,tBTM_ESCO_CBACK * p_esco_cback)65 tBTM_STATUS BTM_RegForEScoEvts(uint16_t sco_inx,
66 tBTM_ESCO_CBACK* p_esco_cback) {
67 mock_function_count_map[__func__]++;
68 return BTM_SUCCESS;
69 }
BTM_RemoveSco(uint16_t sco_inx)70 tBTM_STATUS BTM_RemoveSco(uint16_t sco_inx) {
71 mock_function_count_map[__func__]++;
72 return BTM_SUCCESS;
73 }
BTM_SetEScoMode(enh_esco_params_t * p_parms)74 tBTM_STATUS BTM_SetEScoMode(enh_esco_params_t* p_parms) {
75 mock_function_count_map[__func__]++;
76 return BTM_SUCCESS;
77 }
BTM_GetNumScoLinks(void)78 uint8_t BTM_GetNumScoLinks(void) {
79 mock_function_count_map[__func__]++;
80 return 0;
81 }
BTM_EScoConnRsp(uint16_t sco_inx,uint8_t hci_status,enh_esco_params_t * p_parms)82 void BTM_EScoConnRsp(uint16_t sco_inx, uint8_t hci_status,
83 enh_esco_params_t* p_parms) {
84 mock_function_count_map[__func__]++;
85 }
BTM_RemoveSco(const RawAddress & bda)86 void BTM_RemoveSco(const RawAddress& bda) {
87 mock_function_count_map[__func__]++;
88 }
btm_esco_proc_conn_chg(uint8_t status,uint16_t handle,uint8_t tx_interval,uint8_t retrans_window,uint16_t rx_pkt_len,uint16_t tx_pkt_len)89 void btm_esco_proc_conn_chg(uint8_t status, uint16_t handle,
90 uint8_t tx_interval, uint8_t retrans_window,
91 uint16_t rx_pkt_len, uint16_t tx_pkt_len) {
92 mock_function_count_map[__func__]++;
93 }
btm_route_sco_data(BT_HDR * p_msg)94 void btm_route_sco_data(BT_HDR* p_msg) { mock_function_count_map[__func__]++; }
btm_sco_acl_removed(const RawAddress * bda)95 void btm_sco_acl_removed(const RawAddress* bda) {
96 mock_function_count_map[__func__]++;
97 }
btm_sco_chk_pend_rolechange(uint16_t hci_handle)98 void btm_sco_chk_pend_rolechange(uint16_t hci_handle) {
99 mock_function_count_map[__func__]++;
100 }
btm_sco_chk_pend_unpark(tHCI_STATUS hci_status,uint16_t hci_handle)101 void btm_sco_chk_pend_unpark(tHCI_STATUS hci_status, uint16_t hci_handle) {
102 mock_function_count_map[__func__]++;
103 }
btm_sco_conn_req(const RawAddress & bda,const DEV_CLASS & dev_class,uint8_t link_type)104 void btm_sco_conn_req(const RawAddress& bda, const DEV_CLASS& dev_class,
105 uint8_t link_type) {
106 mock_function_count_map[__func__]++;
107 }
btm_sco_connected(tHCI_STATUS hci_status,const RawAddress & bda,uint16_t hci_handle,tBTM_ESCO_DATA * p_esco_data)108 void btm_sco_connected(tHCI_STATUS hci_status, const RawAddress& bda,
109 uint16_t hci_handle, tBTM_ESCO_DATA* p_esco_data) {
110 mock_function_count_map[__func__]++;
111 }
btm_sco_disc_chk_pend_for_modechange(uint16_t hci_handle)112 void btm_sco_disc_chk_pend_for_modechange(uint16_t hci_handle) {
113 mock_function_count_map[__func__]++;
114 }
btm_sco_on_esco_connect_request(const RawAddress & bda,const bluetooth::types::ClassOfDevice & cod)115 void btm_sco_on_esco_connect_request(
116 const RawAddress& bda, const bluetooth::types::ClassOfDevice& cod) {
117 mock_function_count_map[__func__]++;
118 }
btm_sco_on_sco_connect_request(const RawAddress & bda,const bluetooth::types::ClassOfDevice & cod)119 void btm_sco_on_sco_connect_request(
120 const RawAddress& bda, const bluetooth::types::ClassOfDevice& cod) {
121 mock_function_count_map[__func__]++;
122 }
btm_sco_on_disconnected(uint16_t hci_handle,tHCI_REASON reason)123 void btm_sco_on_disconnected(uint16_t hci_handle, tHCI_REASON reason) {
124 mock_function_count_map[__func__]++;
125 }
126