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:16
20 */
21
22 #include <map>
23 #include <string>
24
25 extern std::map<std::string, int> mock_function_count_map;
26
27 #include <stddef.h>
28 #include <stdio.h>
29 #include <stdlib.h>
30 #include <string.h>
31 #include "bt_common.h"
32 #include "bt_types.h"
33 #include "btm_api.h"
34 #include "btu.h"
35 #include "device/include/controller.h"
36 #include "hcidefs.h"
37 #include "hcimsgs.h"
38 #include "l2c_api.h"
39 #include "main/shim/btm_api.h"
40 #include "main/shim/shim.h"
41 #include "stack/btm/btm_dev.h"
42 #include "stack/include/acl_api.h"
43
44 #ifndef UNUSED_ATTR
45 #define UNUSED_ATTR
46 #endif
47
BTM_SecAddDevice(const RawAddress & bd_addr,DEV_CLASS dev_class,BD_NAME bd_name,uint8_t * features,LinkKey * p_link_key,uint8_t key_type,uint8_t pin_length)48 bool BTM_SecAddDevice(const RawAddress& bd_addr, DEV_CLASS dev_class,
49 BD_NAME bd_name, uint8_t* features, LinkKey* p_link_key,
50 uint8_t key_type, uint8_t pin_length) {
51 mock_function_count_map[__func__]++;
52 return false;
53 }
BTM_SecDeleteDevice(const RawAddress & bd_addr)54 bool BTM_SecDeleteDevice(const RawAddress& bd_addr) {
55 mock_function_count_map[__func__]++;
56 return false;
57 }
btm_dev_support_role_switch(const RawAddress & bd_addr)58 bool btm_dev_support_role_switch(const RawAddress& bd_addr) {
59 mock_function_count_map[__func__]++;
60 return false;
61 }
btm_set_bond_type_dev(const RawAddress & bd_addr,tBTM_SEC_DEV_REC::tBTM_BOND_TYPE bond_type)62 bool btm_set_bond_type_dev(const RawAddress& bd_addr,
63 tBTM_SEC_DEV_REC::tBTM_BOND_TYPE bond_type) {
64 mock_function_count_map[__func__]++;
65 return false;
66 }
is_address_equal(void * data,void * context)67 bool is_address_equal(void* data, void* context) {
68 mock_function_count_map[__func__]++;
69 return false;
70 }
is_handle_equal(void * data,void * context)71 bool is_handle_equal(void* data, void* context) {
72 mock_function_count_map[__func__]++;
73 return false;
74 }
BTM_SecReadDevName(const RawAddress & bd_addr)75 char* BTM_SecReadDevName(const RawAddress& bd_addr) {
76 mock_function_count_map[__func__]++;
77 return nullptr;
78 }
btm_find_dev(const RawAddress & bd_addr)79 tBTM_SEC_DEV_REC* btm_find_dev(const RawAddress& bd_addr) {
80 mock_function_count_map[__func__]++;
81 return nullptr;
82 }
btm_find_dev_by_handle(uint16_t handle)83 tBTM_SEC_DEV_REC* btm_find_dev_by_handle(uint16_t handle) {
84 mock_function_count_map[__func__]++;
85 return nullptr;
86 }
btm_find_or_alloc_dev(const RawAddress & bd_addr)87 tBTM_SEC_DEV_REC* btm_find_or_alloc_dev(const RawAddress& bd_addr) {
88 mock_function_count_map[__func__]++;
89 return nullptr;
90 }
btm_sec_alloc_dev(const RawAddress & bd_addr)91 tBTM_SEC_DEV_REC* btm_sec_alloc_dev(const RawAddress& bd_addr) {
92 mock_function_count_map[__func__]++;
93 return nullptr;
94 }
btm_sec_allocate_dev_rec(void)95 tBTM_SEC_DEV_REC* btm_sec_allocate_dev_rec(void) {
96 mock_function_count_map[__func__]++;
97 return nullptr;
98 }
btm_get_bond_type_dev(const RawAddress & bd_addr)99 tBTM_SEC_DEV_REC::tBTM_BOND_TYPE btm_get_bond_type_dev(
100 const RawAddress& bd_addr) {
101 mock_function_count_map[__func__]++;
102 return tBTM_SEC_DEV_REC::BOND_TYPE_UNKNOWN;
103 }
BTM_SecClearSecurityFlags(const RawAddress & bd_addr)104 void BTM_SecClearSecurityFlags(const RawAddress& bd_addr) {
105 mock_function_count_map[__func__]++;
106 }
btm_consolidate_dev(tBTM_SEC_DEV_REC * p_target_rec)107 void btm_consolidate_dev(tBTM_SEC_DEV_REC* p_target_rec) {
108 mock_function_count_map[__func__]++;
109 }
wipe_secrets_and_remove(tBTM_SEC_DEV_REC * p_dev_rec)110 void wipe_secrets_and_remove(tBTM_SEC_DEV_REC* p_dev_rec) {
111 mock_function_count_map[__func__]++;
112 }
113