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:5
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/ble_advertiser_hci_interface.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_advertiser_hci_interface {
47 
48 // Shared state between mocked functions and tests
49 // Name: btm_le_on_advertising_set_terminated
50 // Params: uint8_t* p, uint16_t length
51 // Returns: void
52 struct btm_le_on_advertising_set_terminated {
53   std::function<void(uint8_t* p, uint16_t length)> body{
54       [](uint8_t* p, uint16_t length) {}};
operatorbtm_le_on_advertising_set_terminated55   void operator()(uint8_t* p, uint16_t length) { body(p, length); };
56 };
57 extern struct btm_le_on_advertising_set_terminated
58     btm_le_on_advertising_set_terminated;
59 // Name: btm_ble_advertiser_notify_terminated_legacy
60 // Params: uint8_t status, uint16_t connection_handle
61 // Returns: void
62 struct btm_ble_advertiser_notify_terminated_legacy {
63   std::function<void(uint8_t status, uint16_t connection_handle)> body{
64       [](uint8_t status, uint16_t connection_handle) {}};
operatorbtm_ble_advertiser_notify_terminated_legacy65   void operator()(uint8_t status, uint16_t connection_handle) {
66     body(status, connection_handle);
67   };
68 };
69 extern struct btm_ble_advertiser_notify_terminated_legacy
70     btm_ble_advertiser_notify_terminated_legacy;
71 
72 }  // namespace stack_btm_ble_advertiser_hci_interface
73 }  // namespace mock
74 }  // namespace test
75 
76 // END mockcify generation
77