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:33
20 */
21
22 #include <map>
23 #include <string>
24
25 extern std::map<std::string, int> mock_function_count_map;
26
27 #include <base/bind.h>
28 #include <vector>
29 #include "bt_target.h"
30 #include "bta/dm/bta_dm_int.h"
31 #include "osi/include/allocator.h"
32 #include "stack/btm/btm_sec.h"
33 #include "stack/include/btm_api.h"
34 #include "stack/include/btu.h"
35 #include "types/bluetooth/uuid.h"
36 #include "types/raw_address.h"
37
38 #ifndef UNUSED_ATTR
39 #define UNUSED_ATTR
40 #endif
41
BTA_dm_init()42 void BTA_dm_init() { mock_function_count_map[__func__]++; }
BTA_DmGetConnectionState(const RawAddress & bd_addr)43 bool BTA_DmGetConnectionState(const RawAddress& bd_addr) {
44 mock_function_count_map[__func__]++;
45 return false;
46 }
BTA_DmRemoveDevice(const RawAddress & bd_addr)47 tBTA_STATUS BTA_DmRemoveDevice(const RawAddress& bd_addr) {
48 mock_function_count_map[__func__]++;
49 return BTA_SUCCESS;
50 }
BTA_DmSetLocalDiRecord(tSDP_DI_RECORD * p_device_info,uint32_t * p_handle)51 tBTA_STATUS BTA_DmSetLocalDiRecord(tSDP_DI_RECORD* p_device_info,
52 uint32_t* p_handle) {
53 mock_function_count_map[__func__]++;
54 return BTA_SUCCESS;
55 }
BTA_AddEirUuid(uint16_t uuid16)56 void BTA_AddEirUuid(uint16_t uuid16) { mock_function_count_map[__func__]++; }
BTA_DmAddBleDevice(const RawAddress & bd_addr,tBLE_ADDR_TYPE addr_type,tBT_DEVICE_TYPE dev_type)57 void BTA_DmAddBleDevice(const RawAddress& bd_addr, tBLE_ADDR_TYPE addr_type,
58 tBT_DEVICE_TYPE dev_type) {
59 mock_function_count_map[__func__]++;
60 }
BTA_DmAddBleKey(const RawAddress & bd_addr,tBTA_LE_KEY_VALUE * p_le_key,tBTM_LE_KEY_TYPE key_type)61 void BTA_DmAddBleKey(const RawAddress& bd_addr, tBTA_LE_KEY_VALUE* p_le_key,
62 tBTM_LE_KEY_TYPE key_type) {
63 mock_function_count_map[__func__]++;
64 }
BTA_DmAddDevice(const RawAddress & bd_addr,DEV_CLASS dev_class,const LinkKey & link_key,uint8_t key_type,uint8_t pin_length)65 void BTA_DmAddDevice(const RawAddress& bd_addr, DEV_CLASS dev_class,
66 const LinkKey& link_key, uint8_t key_type,
67 uint8_t pin_length) {
68 mock_function_count_map[__func__]++;
69 }
BTA_DmBleConfigLocalPrivacy(bool privacy_enable)70 void BTA_DmBleConfigLocalPrivacy(bool privacy_enable) {
71 mock_function_count_map[__func__]++;
72 }
BTA_DmBleConfirmReply(const RawAddress & bd_addr,bool accept)73 void BTA_DmBleConfirmReply(const RawAddress& bd_addr, bool accept) {
74 mock_function_count_map[__func__]++;
75 }
BTA_DmBleGetEnergyInfo(tBTA_BLE_ENERGY_INFO_CBACK * p_cmpl_cback)76 void BTA_DmBleGetEnergyInfo(tBTA_BLE_ENERGY_INFO_CBACK* p_cmpl_cback) {
77 mock_function_count_map[__func__]++;
78 }
BTA_DmBlePasskeyReply(const RawAddress & bd_addr,bool accept,uint32_t passkey)79 void BTA_DmBlePasskeyReply(const RawAddress& bd_addr, bool accept,
80 uint32_t passkey) {
81 mock_function_count_map[__func__]++;
82 }
BTA_DmBleRequestMaxTxDataLength(const RawAddress & remote_device)83 void BTA_DmBleRequestMaxTxDataLength(const RawAddress& remote_device) {
84 mock_function_count_map[__func__]++;
85 }
BTA_DmBleSecurityGrant(const RawAddress & bd_addr,tBTA_DM_BLE_SEC_GRANT res)86 void BTA_DmBleSecurityGrant(const RawAddress& bd_addr,
87 tBTA_DM_BLE_SEC_GRANT res) {
88 mock_function_count_map[__func__]++;
89 }
BTA_DmBleUpdateConnectionParams(const RawAddress & bd_addr,uint16_t min_int,uint16_t max_int,uint16_t latency,uint16_t timeout,uint16_t min_ce_len,uint16_t max_ce_len)90 void BTA_DmBleUpdateConnectionParams(const RawAddress& bd_addr,
91 uint16_t min_int, uint16_t max_int,
92 uint16_t latency, uint16_t timeout,
93 uint16_t min_ce_len, uint16_t max_ce_len) {
94 mock_function_count_map[__func__]++;
95 }
BTA_DmBond(const RawAddress & bd_addr,tBLE_ADDR_TYPE addr_type,tBT_TRANSPORT transport,int device_type)96 void BTA_DmBond(const RawAddress& bd_addr, tBLE_ADDR_TYPE addr_type,
97 tBT_TRANSPORT transport, int device_type) {
98 mock_function_count_map[__func__]++;
99 }
BTA_DmBondCancel(const RawAddress & bd_addr)100 void BTA_DmBondCancel(const RawAddress& bd_addr) {
101 mock_function_count_map[__func__]++;
102 }
BTA_DmCloseACL(const RawAddress & bd_addr,bool remove_dev,tBT_TRANSPORT transport)103 void BTA_DmCloseACL(const RawAddress& bd_addr, bool remove_dev,
104 tBT_TRANSPORT transport) {
105 mock_function_count_map[__func__]++;
106 }
BTA_DmConfirm(const RawAddress & bd_addr,bool accept)107 void BTA_DmConfirm(const RawAddress& bd_addr, bool accept) {
108 mock_function_count_map[__func__]++;
109 }
BTA_DmDiscover(const RawAddress & bd_addr,tBTA_DM_SEARCH_CBACK * p_cback,tBT_TRANSPORT transport,bool is_bonding_or_sd)110 void BTA_DmDiscover(const RawAddress& bd_addr, tBTA_DM_SEARCH_CBACK* p_cback,
111 tBT_TRANSPORT transport, bool is_bonding_or_sd) {
112 mock_function_count_map[__func__]++;
113 }
BTA_DmLocalOob(void)114 void BTA_DmLocalOob(void) { mock_function_count_map[__func__]++; }
BTA_DmPinReply(const RawAddress & bd_addr,bool accept,uint8_t pin_len,uint8_t * p_pin)115 void BTA_DmPinReply(const RawAddress& bd_addr, bool accept, uint8_t pin_len,
116 uint8_t* p_pin) {
117 mock_function_count_map[__func__]++;
118 }
BTA_DmSearch(tBTA_DM_SEARCH_CBACK * p_cback,bool is_bonding_or_sdp)119 void BTA_DmSearch(tBTA_DM_SEARCH_CBACK* p_cback, bool is_bonding_or_sdp) {
120 mock_function_count_map[__func__]++;
121 }
BTA_DmSearchCancel(void)122 void BTA_DmSearchCancel(void) { mock_function_count_map[__func__]++; }
BTA_DmSetBlePrefConnParams(const RawAddress & bd_addr,uint16_t min_conn_int,uint16_t max_conn_int,uint16_t peripheral_latency,uint16_t supervision_tout)123 void BTA_DmSetBlePrefConnParams(const RawAddress& bd_addr,
124 uint16_t min_conn_int, uint16_t max_conn_int,
125 uint16_t peripheral_latency,
126 uint16_t supervision_tout) {
127 mock_function_count_map[__func__]++;
128 }
BTA_DmSetDeviceName(char * p_name)129 void BTA_DmSetDeviceName(char* p_name) { mock_function_count_map[__func__]++; }
BTA_DmSetEncryption(const RawAddress & bd_addr,tBT_TRANSPORT transport,tBTA_DM_ENCRYPT_CBACK * p_callback,tBTM_BLE_SEC_ACT sec_act)130 void BTA_DmSetEncryption(const RawAddress& bd_addr, tBT_TRANSPORT transport,
131 tBTA_DM_ENCRYPT_CBACK* p_callback,
132 tBTM_BLE_SEC_ACT sec_act) {
133 mock_function_count_map[__func__]++;
134 }
BTA_EnableTestMode(void)135 void BTA_EnableTestMode(void) { mock_function_count_map[__func__]++; }
BTA_GetEirService(uint8_t * p_eir,size_t eir_len,tBTA_SERVICE_MASK * p_services)136 void BTA_GetEirService(uint8_t* p_eir, size_t eir_len,
137 tBTA_SERVICE_MASK* p_services) {
138 mock_function_count_map[__func__]++;
139 }
BTA_RemoveEirUuid(uint16_t uuid16)140 void BTA_RemoveEirUuid(uint16_t uuid16) { mock_function_count_map[__func__]++; }
BTA_DmBleObserve(bool start,uint8_t duration,tBTA_DM_SEARCH_CBACK * p_results_cb)141 void BTA_DmBleObserve(bool start, uint8_t duration,
142 tBTA_DM_SEARCH_CBACK* p_results_cb) {
143 mock_function_count_map[__func__]++;
144 }
BTA_VendorInit(void)145 void BTA_VendorInit(void) { mock_function_count_map[__func__]++; }
146