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:13
20  *
21  *  mockcify.pl ver 0.2
22  */
23 
24 #include <map>
25 #include <string>
26 
27 extern std::map<std::string, int> mock_function_count_map;
28 
29 // Original included files, if any
30 // NOTE: Since this is a mock file with mock definitions some number of
31 //       include files may not be required.  The include-what-you-use
32 //       still applies, but crafting proper inclusion is out of scope
33 //       for this effort.  This compilation unit may compile as-is, or
34 //       may need attention to prune the inclusion set.
35 
36 // Mock include file to share data between tests and mock
37 #include "test/mock/mock_stack_btm_ble_privacy.h"
38 
39 // Mocked compile conditionals, if any
40 #ifndef UNUSED_ATTR
41 #define UNUSED_ATTR
42 #endif
43 
44 // Mocked internal structures, if any
45 
46 namespace test {
47 namespace mock {
48 namespace stack_btm_ble_privacy {
49 
50 // Function state capture and return values, if needed
51 struct btm_ble_clear_resolving_list_complete
52     btm_ble_clear_resolving_list_complete;
53 struct btm_ble_add_resolving_list_entry_complete
54     btm_ble_add_resolving_list_entry_complete;
55 struct btm_ble_remove_resolving_list_entry_complete
56     btm_ble_remove_resolving_list_entry_complete;
57 struct btm_ble_read_resolving_list_entry_complete
58     btm_ble_read_resolving_list_entry_complete;
59 struct btm_ble_remove_resolving_list_entry btm_ble_remove_resolving_list_entry;
60 struct btm_ble_clear_resolving_list btm_ble_clear_resolving_list;
61 struct btm_ble_read_resolving_list_entry btm_ble_read_resolving_list_entry;
62 struct btm_ble_disable_resolving_list btm_ble_disable_resolving_list;
63 struct btm_ble_resolving_list_load_dev btm_ble_resolving_list_load_dev;
64 struct btm_ble_resolving_list_remove_dev btm_ble_resolving_list_remove_dev;
65 struct btm_ble_enable_resolving_list btm_ble_enable_resolving_list;
66 struct btm_ble_enable_resolving_list_for_platform
67     btm_ble_enable_resolving_list_for_platform;
68 struct btm_ble_resolving_list_init btm_ble_resolving_list_init;
69 
70 }  // namespace stack_btm_ble_privacy
71 }  // namespace mock
72 }  // namespace test
73 
74 // Mocked functions, if any
btm_ble_clear_resolving_list_complete(uint8_t * p,uint16_t evt_len)75 void btm_ble_clear_resolving_list_complete(uint8_t* p, uint16_t evt_len) {
76   mock_function_count_map[__func__]++;
77   test::mock::stack_btm_ble_privacy::btm_ble_clear_resolving_list_complete(
78       p, evt_len);
79 }
btm_ble_add_resolving_list_entry_complete(uint8_t * p,uint16_t evt_len)80 void btm_ble_add_resolving_list_entry_complete(uint8_t* p, uint16_t evt_len) {
81   mock_function_count_map[__func__]++;
82   test::mock::stack_btm_ble_privacy::btm_ble_add_resolving_list_entry_complete(
83       p, evt_len);
84 }
btm_ble_remove_resolving_list_entry_complete(uint8_t * p,uint16_t evt_len)85 void btm_ble_remove_resolving_list_entry_complete(uint8_t* p,
86                                                   uint16_t evt_len) {
87   mock_function_count_map[__func__]++;
88   test::mock::stack_btm_ble_privacy::
89       btm_ble_remove_resolving_list_entry_complete(p, evt_len);
90 }
btm_ble_read_resolving_list_entry_complete(uint8_t * p,uint16_t evt_len)91 void btm_ble_read_resolving_list_entry_complete(uint8_t* p, uint16_t evt_len) {
92   mock_function_count_map[__func__]++;
93   test::mock::stack_btm_ble_privacy::btm_ble_read_resolving_list_entry_complete(
94       p, evt_len);
95 }
btm_ble_remove_resolving_list_entry(tBTM_SEC_DEV_REC * p_dev_rec)96 tBTM_STATUS btm_ble_remove_resolving_list_entry(tBTM_SEC_DEV_REC* p_dev_rec) {
97   mock_function_count_map[__func__]++;
98   return test::mock::stack_btm_ble_privacy::btm_ble_remove_resolving_list_entry(
99       p_dev_rec);
100 }
btm_ble_clear_resolving_list(void)101 void btm_ble_clear_resolving_list(void) {
102   mock_function_count_map[__func__]++;
103   test::mock::stack_btm_ble_privacy::btm_ble_clear_resolving_list();
104 }
btm_ble_read_resolving_list_entry(tBTM_SEC_DEV_REC * p_dev_rec)105 bool btm_ble_read_resolving_list_entry(tBTM_SEC_DEV_REC* p_dev_rec) {
106   mock_function_count_map[__func__]++;
107   return test::mock::stack_btm_ble_privacy::btm_ble_read_resolving_list_entry(
108       p_dev_rec);
109 }
btm_ble_disable_resolving_list(uint8_t rl_mask,bool to_resume)110 bool btm_ble_disable_resolving_list(uint8_t rl_mask, bool to_resume) {
111   mock_function_count_map[__func__]++;
112   return test::mock::stack_btm_ble_privacy::btm_ble_disable_resolving_list(
113       rl_mask, to_resume);
114 }
btm_ble_resolving_list_load_dev(tBTM_SEC_DEV_REC * p_dev_rec)115 bool btm_ble_resolving_list_load_dev(tBTM_SEC_DEV_REC* p_dev_rec) {
116   mock_function_count_map[__func__]++;
117   return test::mock::stack_btm_ble_privacy::btm_ble_resolving_list_load_dev(
118       p_dev_rec);
119 }
btm_ble_resolving_list_remove_dev(tBTM_SEC_DEV_REC * p_dev_rec)120 void btm_ble_resolving_list_remove_dev(tBTM_SEC_DEV_REC* p_dev_rec) {
121   mock_function_count_map[__func__]++;
122   test::mock::stack_btm_ble_privacy::btm_ble_resolving_list_remove_dev(
123       p_dev_rec);
124 }
btm_ble_enable_resolving_list(uint8_t rl_mask)125 void btm_ble_enable_resolving_list(uint8_t rl_mask) {
126   mock_function_count_map[__func__]++;
127   test::mock::stack_btm_ble_privacy::btm_ble_enable_resolving_list(rl_mask);
128 }
btm_ble_enable_resolving_list_for_platform(uint8_t rl_mask)129 void btm_ble_enable_resolving_list_for_platform(uint8_t rl_mask) {
130   mock_function_count_map[__func__]++;
131   test::mock::stack_btm_ble_privacy::btm_ble_enable_resolving_list_for_platform(
132       rl_mask);
133 }
btm_ble_resolving_list_init(uint8_t max_irk_list_sz)134 void btm_ble_resolving_list_init(uint8_t max_irk_list_sz) {
135   mock_function_count_map[__func__]++;
136   test::mock::stack_btm_ble_privacy::btm_ble_resolving_list_init(
137       max_irk_list_sz);
138 }
139 
140 // END mockcify generation
141