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 <cstdint>
25 #include <functional>
26 #include <map>
27 #include <string>
28 
29 extern std::map<std::string, int> mock_function_count_map;
30 
31 // Original included files, if any
32 // NOTE: Since this is a mock file with mock definitions some number of
33 //       include files may not be required.  The include-what-you-use
34 //       still applies, but crafting proper inclusion is out of scope
35 //       for this effort.  This compilation unit may compile as-is, or
36 //       may need attention to prune the inclusion set.
37 #include "stack/btm/security_device_record.h"
38 
39 // Mocked compile conditionals, if any
40 #ifndef UNUSED_ATTR
41 #define UNUSED_ATTR
42 #endif
43 
44 namespace test {
45 namespace mock {
46 namespace stack_btm_ble_privacy {
47 
48 // Shared state between mocked functions and tests
49 // Name: btm_ble_clear_resolving_list_complete
50 // Params: uint8_t* p, uint16_t evt_len
51 // Returns: void
52 struct btm_ble_clear_resolving_list_complete {
53   std::function<void(uint8_t* p, uint16_t evt_len)> body{
54       [](uint8_t* p, uint16_t evt_len) {}};
operatorbtm_ble_clear_resolving_list_complete55   void operator()(uint8_t* p, uint16_t evt_len) { body(p, evt_len); };
56 };
57 extern struct btm_ble_clear_resolving_list_complete
58     btm_ble_clear_resolving_list_complete;
59 // Name: btm_ble_add_resolving_list_entry_complete
60 // Params: uint8_t* p, uint16_t evt_len
61 // Returns: void
62 struct btm_ble_add_resolving_list_entry_complete {
63   std::function<void(uint8_t* p, uint16_t evt_len)> body{
64       [](uint8_t* p, uint16_t evt_len) {}};
operatorbtm_ble_add_resolving_list_entry_complete65   void operator()(uint8_t* p, uint16_t evt_len) { body(p, evt_len); };
66 };
67 extern struct btm_ble_add_resolving_list_entry_complete
68     btm_ble_add_resolving_list_entry_complete;
69 // Name: btm_ble_remove_resolving_list_entry_complete
70 // Params: uint8_t* p, uint16_t evt_len
71 // Returns: void
72 struct btm_ble_remove_resolving_list_entry_complete {
73   std::function<void(uint8_t* p, uint16_t evt_len)> body{
74       [](uint8_t* p, uint16_t evt_len) {}};
operatorbtm_ble_remove_resolving_list_entry_complete75   void operator()(uint8_t* p, uint16_t evt_len) { body(p, evt_len); };
76 };
77 extern struct btm_ble_remove_resolving_list_entry_complete
78     btm_ble_remove_resolving_list_entry_complete;
79 // Name: btm_ble_read_resolving_list_entry_complete
80 // Params: uint8_t* p, uint16_t evt_len
81 // Returns: void
82 struct btm_ble_read_resolving_list_entry_complete {
83   std::function<void(uint8_t* p, uint16_t evt_len)> body{
84       [](uint8_t* p, uint16_t evt_len) {}};
operatorbtm_ble_read_resolving_list_entry_complete85   void operator()(uint8_t* p, uint16_t evt_len) { body(p, evt_len); };
86 };
87 extern struct btm_ble_read_resolving_list_entry_complete
88     btm_ble_read_resolving_list_entry_complete;
89 // Name: btm_ble_remove_resolving_list_entry
90 // Params: tBTM_SEC_DEV_REC* p_dev_rec
91 // Returns: tBTM_STATUS
92 struct btm_ble_remove_resolving_list_entry {
93   std::function<tBTM_STATUS(tBTM_SEC_DEV_REC* p_dev_rec)> body{
94       [](tBTM_SEC_DEV_REC* p_dev_rec) { return 0; }};
operatorbtm_ble_remove_resolving_list_entry95   tBTM_STATUS operator()(tBTM_SEC_DEV_REC* p_dev_rec) {
96     return body(p_dev_rec);
97   };
98 };
99 extern struct btm_ble_remove_resolving_list_entry
100     btm_ble_remove_resolving_list_entry;
101 // Name: btm_ble_clear_resolving_list
102 // Params: void
103 // Returns: void
104 struct btm_ble_clear_resolving_list {
105   std::function<void(void)> body{[](void) {}};
operatorbtm_ble_clear_resolving_list106   void operator()(void) { body(); };
107 };
108 extern struct btm_ble_clear_resolving_list btm_ble_clear_resolving_list;
109 // Name: btm_ble_read_resolving_list_entry
110 // Params: tBTM_SEC_DEV_REC* p_dev_rec
111 // Returns: bool
112 struct btm_ble_read_resolving_list_entry {
113   std::function<bool(tBTM_SEC_DEV_REC* p_dev_rec)> body{
114       [](tBTM_SEC_DEV_REC* p_dev_rec) { return false; }};
operatorbtm_ble_read_resolving_list_entry115   bool operator()(tBTM_SEC_DEV_REC* p_dev_rec) { return body(p_dev_rec); };
116 };
117 extern struct btm_ble_read_resolving_list_entry
118     btm_ble_read_resolving_list_entry;
119 // Name: btm_ble_disable_resolving_list
120 // Params: uint8_t rl_mask, bool to_resume
121 // Returns: bool
122 struct btm_ble_disable_resolving_list {
123   std::function<bool(uint8_t rl_mask, bool to_resume)> body{
124       [](uint8_t rl_mask, bool to_resume) { return false; }};
operatorbtm_ble_disable_resolving_list125   bool operator()(uint8_t rl_mask, bool to_resume) {
126     return body(rl_mask, to_resume);
127   };
128 };
129 extern struct btm_ble_disable_resolving_list btm_ble_disable_resolving_list;
130 // Name: btm_ble_resolving_list_load_dev
131 // Params: tBTM_SEC_DEV_REC* p_dev_rec
132 // Returns: bool
133 struct btm_ble_resolving_list_load_dev {
134   std::function<bool(tBTM_SEC_DEV_REC* p_dev_rec)> body{
135       [](tBTM_SEC_DEV_REC* p_dev_rec) { return false; }};
operatorbtm_ble_resolving_list_load_dev136   bool operator()(tBTM_SEC_DEV_REC* p_dev_rec) { return body(p_dev_rec); };
137 };
138 extern struct btm_ble_resolving_list_load_dev btm_ble_resolving_list_load_dev;
139 // Name: btm_ble_resolving_list_remove_dev
140 // Params: tBTM_SEC_DEV_REC* p_dev_rec
141 // Returns: void
142 struct btm_ble_resolving_list_remove_dev {
143   std::function<void(tBTM_SEC_DEV_REC* p_dev_rec)> body{
144       [](tBTM_SEC_DEV_REC* p_dev_rec) {}};
operatorbtm_ble_resolving_list_remove_dev145   void operator()(tBTM_SEC_DEV_REC* p_dev_rec) { body(p_dev_rec); };
146 };
147 extern struct btm_ble_resolving_list_remove_dev
148     btm_ble_resolving_list_remove_dev;
149 // Name: btm_ble_enable_resolving_list
150 // Params: uint8_t rl_mask
151 // Returns: void
152 struct btm_ble_enable_resolving_list {
153   std::function<void(uint8_t rl_mask)> body{[](uint8_t rl_mask) {}};
operatorbtm_ble_enable_resolving_list154   void operator()(uint8_t rl_mask) { body(rl_mask); };
155 };
156 extern struct btm_ble_enable_resolving_list btm_ble_enable_resolving_list;
157 // Name: btm_ble_enable_resolving_list_for_platform
158 // Params: uint8_t rl_mask
159 // Returns: void
160 struct btm_ble_enable_resolving_list_for_platform {
161   std::function<void(uint8_t rl_mask)> body{[](uint8_t rl_mask) {}};
operatorbtm_ble_enable_resolving_list_for_platform162   void operator()(uint8_t rl_mask) { body(rl_mask); };
163 };
164 extern struct btm_ble_enable_resolving_list_for_platform
165     btm_ble_enable_resolving_list_for_platform;
166 // Name: btm_ble_resolving_list_init
167 // Params: uint8_t max_irk_list_sz
168 // Returns: void
169 struct btm_ble_resolving_list_init {
170   std::function<void(uint8_t max_irk_list_sz)> body{
171       [](uint8_t max_irk_list_sz) {}};
operatorbtm_ble_resolving_list_init172   void operator()(uint8_t max_irk_list_sz) { body(max_irk_list_sz); };
173 };
174 extern struct btm_ble_resolving_list_init btm_ble_resolving_list_init;
175 
176 }  // namespace stack_btm_ble_privacy
177 }  // namespace mock
178 }  // namespace test
179 
180 // END mockcify generation
181