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:47
20 */
21
22 #include <cstdint>
23 #include <vector>
24
25 #include "stack/btm/btm_ble_int.h"
26 #include "stack/btm/btm_ble_int_types.h"
27 #include "stack/include/bt_dev_class.h"
28 #include "stack/include/btm_api_types.h"
29 #include "stack/include/hci_error_code.h"
30 #include "test/common/mock_functions.h"
31 #include "types/ble_address_with_type.h"
32 #include "types/raw_address.h"
33
34 using StartSyncCb = base::Callback<void(
35 uint8_t /*status*/, uint16_t /*sync_handle*/, uint8_t /*advertising_sid*/,
36 uint8_t /*address_type*/, RawAddress /*address*/, uint8_t /*phy*/,
37 uint16_t /*interval*/)>;
38 using SyncReportCb = base::Callback<void(
39 uint16_t /*sync_handle*/, int8_t /*tx_power*/, int8_t /*rssi*/,
40 uint8_t /*status*/, std::vector<uint8_t> /*data*/)>;
41 using SyncLostCb = base::Callback<void(uint16_t /*sync_handle*/)>;
42 using SyncTransferCb = base::Callback<void(uint8_t /*status*/, RawAddress)>;
43
ble_vnd_is_included()44 bool ble_vnd_is_included() {
45 inc_func_call_count(__func__);
46 return false;
47 }
BTM_BleConfigPrivacy(bool)48 bool BTM_BleConfigPrivacy(bool /* privacy_mode */) {
49 inc_func_call_count(__func__);
50 return false;
51 }
BTM_BleLocalPrivacyEnabled(void)52 bool BTM_BleLocalPrivacyEnabled(void) {
53 inc_func_call_count(__func__);
54 return false;
55 }
btm_ble_cancel_remote_name(const RawAddress &)56 bool btm_ble_cancel_remote_name(const RawAddress& /* remote_bda */) {
57 inc_func_call_count(__func__);
58 return false;
59 }
btm_ble_clear_topology_mask(tBTM_BLE_STATE_MASK)60 bool btm_ble_clear_topology_mask(tBTM_BLE_STATE_MASK /* request_state_mask */) {
61 inc_func_call_count(__func__);
62 return false;
63 }
btm_ble_set_topology_mask(tBTM_BLE_STATE_MASK)64 bool btm_ble_set_topology_mask(tBTM_BLE_STATE_MASK /* request_state_mask */) {
65 inc_func_call_count(__func__);
66 return false;
67 }
btm_ble_topology_check(tBTM_BLE_STATE_MASK)68 bool btm_ble_topology_check(tBTM_BLE_STATE_MASK /* request_state_mask */) {
69 inc_func_call_count(__func__);
70 return false;
71 }
BTM_BleObserve(bool,uint8_t,tBTM_INQ_RESULTS_CB *,tBTM_CMPL_CB *,bool)72 tBTM_STATUS BTM_BleObserve(bool /* start */, uint8_t /* duration */,
73 tBTM_INQ_RESULTS_CB* /* p_results_cb */,
74 tBTM_CMPL_CB* /* p_cmpl_cb */,
75 bool /* low_latency_scan */) {
76 inc_func_call_count(__func__);
77 return BTM_SUCCESS;
78 }
BTM_BleOpportunisticObserve(bool,tBTM_INQ_RESULTS_CB *)79 void BTM_BleOpportunisticObserve(bool /* enable */,
80 tBTM_INQ_RESULTS_CB* /* p_results_cb */) {
81 inc_func_call_count(__func__);
82 }
BTM_BleTargetAnnouncementObserve(bool,tBTM_INQ_RESULTS_CB *)83 void BTM_BleTargetAnnouncementObserve(bool /* enable */,
84 tBTM_INQ_RESULTS_CB* /* p_results_cb */) {
85 inc_func_call_count(__func__);
86 }
btm_ble_read_remote_name(const RawAddress &,tBTM_CMPL_CB *)87 tBTM_STATUS btm_ble_read_remote_name(const RawAddress& /* remote_bda */,
88 tBTM_CMPL_CB* /* p_cb */) {
89 inc_func_call_count(__func__);
90 return BTM_SUCCESS;
91 }
btm_ble_set_connectability(uint16_t)92 tBTM_STATUS btm_ble_set_connectability(uint16_t /* combined_mode */) {
93 inc_func_call_count(__func__);
94 return BTM_SUCCESS;
95 }
btm_ble_set_discoverability(uint16_t)96 tBTM_STATUS btm_ble_set_discoverability(uint16_t /* combined_mode */) {
97 inc_func_call_count(__func__);
98 return BTM_SUCCESS;
99 }
btm_ble_start_inquiry(uint8_t)100 tBTM_STATUS btm_ble_start_inquiry(uint8_t /* duration */) {
101 inc_func_call_count(__func__);
102 return BTM_SUCCESS;
103 }
BTM_BleGetDynamicAudioBuffer(tBTM_BT_DYNAMIC_AUDIO_BUFFER_CB[])104 void BTM_BleGetDynamicAudioBuffer(
105 tBTM_BT_DYNAMIC_AUDIO_BUFFER_CB /* p_dynamic_audio_buffer_cb*/[]) {
106 inc_func_call_count(__func__);
107 }
BTM_BleGetVendorCapabilities(tBTM_BLE_VSC_CB *)108 void BTM_BleGetVendorCapabilities(tBTM_BLE_VSC_CB* /* p_cmn_vsc_cb */) {
109 inc_func_call_count(__func__);
110 }
BTM_BleSetScanParams(uint32_t,uint32_t,tBLE_SCAN_MODE,base::Callback<void (uint8_t)>)111 void BTM_BleSetScanParams(uint32_t /* scan_interval */,
112 uint32_t /* scan_window */,
113 tBLE_SCAN_MODE /* scan_mode */,
114 base::Callback<void(uint8_t)> /* cb */) {
115 inc_func_call_count(__func__);
116 }
btm_ble_decrement_link_topology_mask(uint8_t)117 void btm_ble_decrement_link_topology_mask(uint8_t /* link_role */) {
118 inc_func_call_count(__func__);
119 }
btm_ble_free()120 void btm_ble_free() { inc_func_call_count(__func__); }
btm_ble_increment_link_topology_mask(uint8_t)121 void btm_ble_increment_link_topology_mask(uint8_t /* link_role */) {
122 inc_func_call_count(__func__);
123 }
btm_ble_init(void)124 void btm_ble_init(void) { inc_func_call_count(__func__); }
btm_ble_get_appearance_as_cod(std::vector<uint8_t> const &)125 DEV_CLASS btm_ble_get_appearance_as_cod(
126 std::vector<uint8_t> const& /* data */) {
127 inc_func_call_count(__func__);
128 return kDevClassUnclassified;
129 }
btm_ble_process_adv_addr(RawAddress &,tBLE_ADDR_TYPE *)130 void btm_ble_process_adv_addr(RawAddress& /* bda */,
131 tBLE_ADDR_TYPE* /* addr_type */) {
132 inc_func_call_count(__func__);
133 }
btm_ble_process_adv_pkt_cont(uint16_t,tBLE_ADDR_TYPE,const RawAddress &,uint8_t,uint8_t,uint8_t,int8_t,int8_t,uint16_t,uint8_t,const uint8_t *,const RawAddress &)134 void btm_ble_process_adv_pkt_cont(
135 uint16_t /* evt_type */, tBLE_ADDR_TYPE /* addr_type */,
136 const RawAddress& /* bda */, uint8_t /* primary_phy */,
137 uint8_t /* secondary_phy */, uint8_t /* advertising_sid */,
138 int8_t /* tx_power */, int8_t /* rssi */, uint16_t /* periodic_adv_int */,
139 uint8_t /* data_len */, const uint8_t* /* data */,
140 const RawAddress& /* original_bda */) {
141 inc_func_call_count(__func__);
142 }
btm_ble_process_adv_pkt_cont_for_inquiry(uint16_t,tBLE_ADDR_TYPE,const RawAddress &,uint8_t,uint8_t,uint8_t,int8_t,int8_t,uint16_t,std::vector<uint8_t>)143 void btm_ble_process_adv_pkt_cont_for_inquiry(
144 uint16_t /* evt_type */, tBLE_ADDR_TYPE /* addr_type */,
145 const RawAddress& /* bda */, uint8_t /* primary_phy */,
146 uint8_t /* secondary_phy */, uint8_t /* advertising_sid */,
147 int8_t /* tx_power */, int8_t /* rssi */, uint16_t /* periodic_adv_int */,
148 std::vector<uint8_t> /* advertising_data */) {
149 inc_func_call_count(__func__);
150 }
btm_ble_read_remote_features_complete(uint8_t *,uint8_t)151 void btm_ble_read_remote_features_complete(uint8_t* /* p */,
152 uint8_t /* length */) {
153 inc_func_call_count(__func__);
154 }
btm_ble_read_remote_name_cmpl(bool,const RawAddress &,uint16_t,char *)155 void btm_ble_read_remote_name_cmpl(bool /* status */,
156 const RawAddress& /* bda */,
157 uint16_t /* length */, char* /* p_name */) {
158 inc_func_call_count(__func__);
159 }
btm_ble_set_adv_flag(uint16_t,uint16_t)160 void btm_ble_set_adv_flag(uint16_t /* connect_mode */,
161 uint16_t /* disc_mode */) {
162 inc_func_call_count(__func__);
163 }
btm_ble_stop_inquiry(void)164 void btm_ble_stop_inquiry(void) { inc_func_call_count(__func__); }
btm_ble_update_dmt_flag_bits(uint8_t *,const uint16_t,const uint16_t)165 void btm_ble_update_dmt_flag_bits(uint8_t* /* adv_flag_value */,
166 const uint16_t /* connect_mode */,
167 const uint16_t /* disc_mode */) {
168 inc_func_call_count(__func__);
169 }
btm_ble_update_mode_operation(uint8_t,const RawAddress *,tHCI_STATUS)170 void btm_ble_update_mode_operation(uint8_t /* link_role */,
171 const RawAddress* /* bd_addr */,
172 tHCI_STATUS /* status */) {
173 inc_func_call_count(__func__);
174 }
btm_ble_write_adv_enable_complete(uint8_t *,uint16_t)175 void btm_ble_write_adv_enable_complete(uint8_t* /* p */,
176 uint16_t /* evt_len */) {
177 inc_func_call_count(__func__);
178 }
btm_send_hci_set_scan_params(uint8_t,uint16_t,uint16_t,tBLE_ADDR_TYPE,uint8_t)179 void btm_send_hci_set_scan_params(uint8_t /* scan_type */,
180 uint16_t /* scan_int */,
181 uint16_t /* scan_win */,
182 tBLE_ADDR_TYPE /* addr_type_own */,
183 uint8_t /* scan_filter_policy */) {
184 inc_func_call_count(__func__);
185 }
186