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 <base/functional/callback.h>
23
24 #include <cstdint>
25 #include <vector>
26
27 #include "stack/btm/btm_ble_int.h"
28 #include "stack/btm/btm_ble_int_types.h"
29 #include "stack/include/bt_dev_class.h"
30 #include "stack/include/btm_ble_api.h"
31 #include "stack/include/btm_status.h"
32 #include "stack/include/hci_error_code.h"
33 #include "stack/include/rnr_interface.h"
34 #include "test/common/mock_functions.h"
35 #include "types/ble_address_with_type.h"
36 #include "types/raw_address.h"
37
38 using StartSyncCb = base::Callback<void(
39 uint8_t /*status*/, uint16_t /*sync_handle*/, uint8_t /*advertising_sid*/,
40 uint8_t /*address_type*/, RawAddress /*address*/, uint8_t /*phy*/, uint16_t /*interval*/)>;
41 using SyncReportCb =
42 base::Callback<void(uint16_t /*sync_handle*/, int8_t /*tx_power*/, int8_t /*rssi*/,
43 uint8_t /*status*/, std::vector<uint8_t> /*data*/)>;
44 using SyncLostCb = base::Callback<void(uint16_t /*sync_handle*/)>;
45 using SyncTransferCb = base::Callback<void(uint8_t /*status*/, RawAddress)>;
46
BTM_BleConfigPrivacy(bool)47 bool BTM_BleConfigPrivacy(bool /* privacy_mode */) {
48 inc_func_call_count(__func__);
49 return false;
50 }
BTM_BleLocalPrivacyEnabled(void)51 bool BTM_BleLocalPrivacyEnabled(void) {
52 inc_func_call_count(__func__);
53 return false;
54 }
btm_ble_read_remote_cod(const RawAddress &)55 tBTM_STATUS btm_ble_read_remote_cod(const RawAddress& /* remote_bda */) {
56 inc_func_call_count(__func__);
57 return tBTM_STATUS::BTM_SUCCESS;
58 }
btm_ble_cancel_remote_name(const RawAddress &)59 bool btm_ble_cancel_remote_name(const RawAddress& /* remote_bda */) {
60 inc_func_call_count(__func__);
61 return false;
62 }
btm_ble_clear_topology_mask(tBTM_BLE_STATE_MASK)63 bool btm_ble_clear_topology_mask(tBTM_BLE_STATE_MASK /* request_state_mask */) {
64 inc_func_call_count(__func__);
65 return false;
66 }
btm_ble_set_topology_mask(tBTM_BLE_STATE_MASK)67 bool btm_ble_set_topology_mask(tBTM_BLE_STATE_MASK /* request_state_mask */) {
68 inc_func_call_count(__func__);
69 return false;
70 }
btm_ble_topology_check(tBTM_BLE_STATE_MASK)71 bool btm_ble_topology_check(tBTM_BLE_STATE_MASK /* request_state_mask */) {
72 inc_func_call_count(__func__);
73 return false;
74 }
BTM_BleOpportunisticObserve(bool,tBTM_INQ_RESULTS_CB *)75 void BTM_BleOpportunisticObserve(bool /* enable */, tBTM_INQ_RESULTS_CB* /* p_results_cb */) {
76 inc_func_call_count(__func__);
77 }
BTM_BleTargetAnnouncementObserve(bool,tBTM_INQ_RESULTS_CB *)78 void BTM_BleTargetAnnouncementObserve(bool /* enable */, tBTM_INQ_RESULTS_CB* /* p_results_cb */) {
79 inc_func_call_count(__func__);
80 }
btm_ble_read_remote_name(const RawAddress &,tBTM_NAME_CMPL_CB *)81 tBTM_STATUS btm_ble_read_remote_name(const RawAddress& /* remote_bda */,
82 tBTM_NAME_CMPL_CB* /* p_cb */) {
83 inc_func_call_count(__func__);
84 return tBTM_STATUS::BTM_SUCCESS;
85 }
btm_ble_set_connectability(uint16_t)86 tBTM_STATUS btm_ble_set_connectability(uint16_t /* combined_mode */) {
87 inc_func_call_count(__func__);
88 return tBTM_STATUS::BTM_SUCCESS;
89 }
btm_ble_set_discoverability(uint16_t)90 tBTM_STATUS btm_ble_set_discoverability(uint16_t /* combined_mode */) {
91 inc_func_call_count(__func__);
92 return tBTM_STATUS::BTM_SUCCESS;
93 }
btm_ble_start_inquiry(uint8_t)94 tBTM_STATUS btm_ble_start_inquiry(uint8_t /* duration */) {
95 inc_func_call_count(__func__);
96 return tBTM_STATUS::BTM_SUCCESS;
97 }
BTM_BleGetDynamicAudioBuffer(tBTM_BT_DYNAMIC_AUDIO_BUFFER_CB[])98 void BTM_BleGetDynamicAudioBuffer(
99 tBTM_BT_DYNAMIC_AUDIO_BUFFER_CB /* p_dynamic_audio_buffer_cb*/[]) {
100 inc_func_call_count(__func__);
101 }
BTM_BleGetVendorCapabilities(tBTM_BLE_VSC_CB *)102 void BTM_BleGetVendorCapabilities(tBTM_BLE_VSC_CB* /* p_cmn_vsc_cb */) {
103 inc_func_call_count(__func__);
104 }
btm_ble_decrement_link_topology_mask(uint8_t)105 void btm_ble_decrement_link_topology_mask(uint8_t /* link_role */) {
106 inc_func_call_count(__func__);
107 }
btm_ble_increment_link_topology_mask(uint8_t)108 void btm_ble_increment_link_topology_mask(uint8_t /* link_role */) {
109 inc_func_call_count(__func__);
110 }
btm_ble_init(void)111 void btm_ble_init(void) { inc_func_call_count(__func__); }
btm_ble_get_appearance_as_cod(std::vector<uint8_t> const &)112 DEV_CLASS btm_ble_get_appearance_as_cod(std::vector<uint8_t> const& /* data */) {
113 inc_func_call_count(__func__);
114 return kDevClassUnclassified;
115 }
btm_ble_process_adv_addr(RawAddress &,tBLE_ADDR_TYPE *)116 void btm_ble_process_adv_addr(RawAddress& /* bda */, tBLE_ADDR_TYPE* /* addr_type */) {
117 inc_func_call_count(__func__);
118 }
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 &)119 void btm_ble_process_adv_pkt_cont(uint16_t /* evt_type */, tBLE_ADDR_TYPE /* addr_type */,
120 const RawAddress& /* bda */, uint8_t /* primary_phy */,
121 uint8_t /* secondary_phy */, uint8_t /* advertising_sid */,
122 int8_t /* tx_power */, int8_t /* rssi */,
123 uint16_t /* periodic_adv_int */, uint8_t /* data_len */,
124 const uint8_t* /* data */, const RawAddress& /* original_bda */) {
125 inc_func_call_count(__func__);
126 }
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>)127 void btm_ble_process_adv_pkt_cont_for_inquiry(
128 uint16_t /* evt_type */, tBLE_ADDR_TYPE /* addr_type */, const RawAddress& /* bda */,
129 uint8_t /* primary_phy */, uint8_t /* secondary_phy */, uint8_t /* advertising_sid */,
130 int8_t /* tx_power */, int8_t /* rssi */, uint16_t /* periodic_adv_int */,
131 std::vector<uint8_t> /* advertising_data */) {
132 inc_func_call_count(__func__);
133 }
btm_ble_read_remote_features_complete(uint8_t *,uint8_t)134 void btm_ble_read_remote_features_complete(uint8_t* /* p */, uint8_t /* length */) {
135 inc_func_call_count(__func__);
136 }
btm_ble_stop_inquiry(void)137 void btm_ble_stop_inquiry(void) { inc_func_call_count(__func__); }
btm_ble_update_mode_operation(uint8_t,const RawAddress *,tHCI_STATUS)138 void btm_ble_update_mode_operation(uint8_t /* link_role */, const RawAddress* /* bd_addr */,
139 tHCI_STATUS /* status */) {
140 inc_func_call_count(__func__);
141 }
btm_ble_write_adv_enable_complete(uint8_t *,uint16_t)142 void btm_ble_write_adv_enable_complete(uint8_t* /* p */, uint16_t /* evt_len */) {
143 inc_func_call_count(__func__);
144 }
btm_send_hci_set_scan_params(uint8_t,uint16_t,uint16_t,uint16_t,uint16_t,uint8_t,tBLE_ADDR_TYPE,uint8_t)145 void btm_send_hci_set_scan_params(uint8_t /* scan_type */, uint16_t /* scan_int_1m */,
146 uint16_t /* scan_win_1m */, uint16_t /* scan_int_coded */,
147 uint16_t /* scan_win_coded */, uint8_t /* scan_phy */,
148 tBLE_ADDR_TYPE /* addr_type_own */,
149 uint8_t /* scan_filter_policy */) {
150 inc_func_call_count(__func__);
151 }
152