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:57
20  */
21 
22 #include <map>
23 #include <string>
24 
25 extern std::map<std::string, int> mock_function_count_map;
26 
27 #include <cstdint>
28 #include "bta/dm/bta_dm_int.h"
29 #include "bta/gatt/bta_gattc_int.h"
30 #include "bta/include/bta_dm_ci.h"
31 #include "btif/include/btif_dm.h"
32 #include "btif/include/btif_storage.h"
33 #include "btif/include/stack_manager.h"
34 #include "device/include/controller.h"
35 #include "device/include/interop.h"
36 #include "main/shim/acl_api.h"
37 #include "main/shim/btm_api.h"
38 #include "main/shim/dumpsys.h"
39 #include "main/shim/shim.h"
40 #include "osi/include/log.h"
41 #include "osi/include/osi.h"
42 #include "stack/btm/btm_sec.h"
43 #include "stack/btm/neighbor_inquiry.h"
44 #include "stack/gatt/connection_manager.h"
45 #include "stack/include/acl_api.h"
46 #include "stack/include/bt_types.h"
47 #include "stack/include/btm_client_interface.h"
48 #include "stack/include/btu.h"
49 #include "types/raw_address.h"
50 
51 #ifndef UNUSED_ATTR
52 #define UNUSED_ATTR
53 #endif
54 
bta_dm_enable(tBTA_DM_SEC_CBACK * p_sec_cback)55 void bta_dm_enable(tBTA_DM_SEC_CBACK* p_sec_cback) {
56   mock_function_count_map[__func__]++;
57 }
BTA_dm_acl_down(const RawAddress bd_addr,tBT_TRANSPORT transport)58 void BTA_dm_acl_down(const RawAddress bd_addr, tBT_TRANSPORT transport) {
59   mock_function_count_map[__func__]++;
60 }
BTA_dm_acl_up(const RawAddress bd_addr,tBT_TRANSPORT transport)61 void BTA_dm_acl_up(const RawAddress bd_addr, tBT_TRANSPORT transport) {
62   mock_function_count_map[__func__]++;
63 }
BTA_dm_notify_remote_features_complete(const RawAddress bd_addr)64 void BTA_dm_notify_remote_features_complete(const RawAddress bd_addr) {
65   mock_function_count_map[__func__]++;
66 }
BTA_dm_on_hw_off()67 void BTA_dm_on_hw_off() { mock_function_count_map[__func__]++; }
BTA_dm_on_hw_on()68 void BTA_dm_on_hw_on() { mock_function_count_map[__func__]++; }
BTA_dm_report_role_change(const RawAddress bd_addr,tHCI_ROLE new_role,tHCI_STATUS hci_status)69 void BTA_dm_report_role_change(const RawAddress bd_addr, tHCI_ROLE new_role,
70                                tHCI_STATUS hci_status) {
71   mock_function_count_map[__func__]++;
72 }
bta_dm_acl_up(const RawAddress & bd_addr,tBT_TRANSPORT transport)73 void bta_dm_acl_up(const RawAddress& bd_addr, tBT_TRANSPORT transport) {
74   mock_function_count_map[__func__]++;
75 }
bta_dm_add_device(std::unique_ptr<tBTA_DM_API_ADD_DEVICE> msg)76 void bta_dm_add_device(std::unique_ptr<tBTA_DM_API_ADD_DEVICE> msg) {
77   mock_function_count_map[__func__]++;
78 }
bta_dm_bond(const RawAddress & bd_addr,tBLE_ADDR_TYPE addr_type,tBT_TRANSPORT transport,int device_type)79 void bta_dm_bond(const RawAddress& bd_addr, tBLE_ADDR_TYPE addr_type,
80                  tBT_TRANSPORT transport, int device_type) {
81   mock_function_count_map[__func__]++;
82 }
bta_dm_bond_cancel(const RawAddress & bd_addr)83 void bta_dm_bond_cancel(const RawAddress& bd_addr) {
84   mock_function_count_map[__func__]++;
85 }
bta_dm_ci_rmt_oob_act(std::unique_ptr<tBTA_DM_CI_RMT_OOB> msg)86 void bta_dm_ci_rmt_oob_act(std::unique_ptr<tBTA_DM_CI_RMT_OOB> msg) {
87   mock_function_count_map[__func__]++;
88 }
bta_dm_close_acl(const RawAddress & bd_addr,bool remove_dev,tBT_TRANSPORT transport)89 void bta_dm_close_acl(const RawAddress& bd_addr, bool remove_dev,
90                       tBT_TRANSPORT transport) {
91   mock_function_count_map[__func__]++;
92 }
bta_dm_confirm(const RawAddress & bd_addr,bool accept)93 void bta_dm_confirm(const RawAddress& bd_addr, bool accept) {
94   mock_function_count_map[__func__]++;
95 }
bta_dm_deinit_cb(void)96 void bta_dm_deinit_cb(void) { mock_function_count_map[__func__]++; }
bta_dm_disable()97 void bta_dm_disable() { mock_function_count_map[__func__]++; }
bta_dm_disc_result(tBTA_DM_MSG * p_data)98 void bta_dm_disc_result(tBTA_DM_MSG* p_data) {
99   mock_function_count_map[__func__]++;
100 }
bta_dm_disc_rmt_name(tBTA_DM_MSG * p_data)101 void bta_dm_disc_rmt_name(tBTA_DM_MSG* p_data) {
102   mock_function_count_map[__func__]++;
103 }
bta_dm_discover(tBTA_DM_MSG * p_data)104 void bta_dm_discover(tBTA_DM_MSG* p_data) {
105   mock_function_count_map[__func__]++;
106 }
bta_dm_free_sdp_db()107 void bta_dm_free_sdp_db() { mock_function_count_map[__func__]++; }
bta_dm_init_cb(void)108 void bta_dm_init_cb(void) { mock_function_count_map[__func__]++; }
bta_dm_inq_cmpl(uint8_t num)109 void bta_dm_inq_cmpl(uint8_t num) { mock_function_count_map[__func__]++; }
bta_dm_pin_reply(std::unique_ptr<tBTA_DM_API_PIN_REPLY> msg)110 void bta_dm_pin_reply(std::unique_ptr<tBTA_DM_API_PIN_REPLY> msg) {
111   mock_function_count_map[__func__]++;
112 }
bta_dm_process_remove_device(const RawAddress & bd_addr)113 void bta_dm_process_remove_device(const RawAddress& bd_addr) {
114   mock_function_count_map[__func__]++;
115 }
bta_dm_queue_disc(tBTA_DM_MSG * p_data)116 void bta_dm_queue_disc(tBTA_DM_MSG* p_data) {
117   mock_function_count_map[__func__]++;
118 }
bta_dm_queue_search(tBTA_DM_MSG * p_data)119 void bta_dm_queue_search(tBTA_DM_MSG* p_data) {
120   mock_function_count_map[__func__]++;
121 }
bta_dm_remove_device(const RawAddress & bd_addr)122 void bta_dm_remove_device(const RawAddress& bd_addr) {
123   mock_function_count_map[__func__]++;
124 }
bta_dm_rm_cback(tBTA_SYS_CONN_STATUS status,uint8_t id,uint8_t app_id,const RawAddress & peer_addr)125 void bta_dm_rm_cback(tBTA_SYS_CONN_STATUS status, uint8_t id, uint8_t app_id,
126                      const RawAddress& peer_addr) {
127   mock_function_count_map[__func__]++;
128 }
bta_dm_rmt_name(tBTA_DM_MSG * p_data)129 void bta_dm_rmt_name(tBTA_DM_MSG* p_data) {
130   mock_function_count_map[__func__]++;
131 }
bta_dm_sdp_result(tBTA_DM_MSG * p_data)132 void bta_dm_sdp_result(tBTA_DM_MSG* p_data) {
133   mock_function_count_map[__func__]++;
134 }
bta_dm_search_cancel()135 void bta_dm_search_cancel() { mock_function_count_map[__func__]++; }
bta_dm_search_cancel_notify()136 void bta_dm_search_cancel_notify() { mock_function_count_map[__func__]++; }
bta_dm_execute_queued_request()137 void bta_dm_execute_queued_request() { mock_function_count_map[__func__]++; }
bta_dm_is_search_request_queued()138 bool bta_dm_is_search_request_queued() {
139   mock_function_count_map[__func__]++;
140   return false;
141 }
bta_dm_search_clear_queue()142 void bta_dm_search_clear_queue() { mock_function_count_map[__func__]++; }
bta_dm_search_cmpl()143 void bta_dm_search_cmpl() { mock_function_count_map[__func__]++; }
bta_dm_search_result(tBTA_DM_MSG * p_data)144 void bta_dm_search_result(tBTA_DM_MSG* p_data) {
145   mock_function_count_map[__func__]++;
146 }
bta_dm_search_start(tBTA_DM_MSG * p_data)147 void bta_dm_search_start(tBTA_DM_MSG* p_data) {
148   mock_function_count_map[__func__]++;
149 }
bta_dm_set_dev_name(const std::vector<uint8_t> & name)150 void bta_dm_set_dev_name(const std::vector<uint8_t>& name) {
151   mock_function_count_map[__func__]++;
152 }
BTA_DmSetVisibility(bt_scan_mode_t mode)153 bool BTA_DmSetVisibility(bt_scan_mode_t mode) {
154   mock_function_count_map[__func__]++;
155   return false;
156 }
handle_remote_features_complete(const RawAddress & bd_addr)157 void handle_remote_features_complete(const RawAddress& bd_addr) {
158   mock_function_count_map[__func__]++;
159 }
bta_dm_check_if_only_hd_connected(const RawAddress & peer_addr)160 bool bta_dm_check_if_only_hd_connected(const RawAddress& peer_addr) {
161   mock_function_count_map[__func__]++;
162   return false;
163 }
164