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:17
20  *
21  *  mockcify.pl ver 0.2.1
22  */
23 
24 #include <cstdint>
25 #include <functional>
26 
27 // Original included files, if any
28 #include "include/hardware/bluetooth.h"
29 #include "types/raw_address.h"
30 
31 // Mocked compile conditionals, if any
32 namespace test {
33 namespace mock {
34 namespace btif_bluetooth {
35 
36 // Shared state between mocked functions and tests
37 // Name: is_atv_device
38 // Params:
39 // Returns: bool
40 struct is_atv_device {
41   std::function<bool()> body{[]() { return false; }};
operatoris_atv_device42   bool operator()() { return body(); }
43 };
44 extern struct is_atv_device is_atv_device;
45 // Name: is_common_criteria_mode
46 // Params:
47 // Returns: bool
48 struct is_common_criteria_mode {
49   std::function<bool()> body{[]() { return false; }};
operatoris_common_criteria_mode50   bool operator()() { return body(); }
51 };
52 extern struct is_common_criteria_mode is_common_criteria_mode;
53 // Name: is_restricted_mode
54 // Params:
55 // Returns: bool
56 struct is_restricted_mode {
57   std::function<bool()> body{[]() { return false; }};
operatoris_restricted_mode58   bool operator()() { return body(); }
59 };
60 extern struct is_restricted_mode is_restricted_mode;
61 // Name: dut_mode_configure
62 // Params: uint8_t enable
63 // Returns: int
64 struct dut_mode_configure {
65   std::function<int(uint8_t enable)> body{[](uint8_t /* enable */) { return 0; }};
operatordut_mode_configure66   int operator()(uint8_t enable) { return body(enable); }
67 };
68 extern struct dut_mode_configure dut_mode_configure;
69 // Name: dut_mode_send
70 // Params: uint16_t opcode, uint8_t* buf, uint8_t len
71 // Returns: int
72 struct dut_mode_send {
73   std::function<int(uint16_t /* opcode */, uint8_t* /* buf */, uint8_t /* len */)> body{
74           [](uint16_t /* opcode */, uint8_t* /* buf */, uint8_t /* len */) { return 0; }};
operatordut_mode_send75   int operator()(uint16_t opcode, uint8_t* buf, uint8_t len) { return body(opcode, buf, len); }
76 };
77 extern struct dut_mode_send dut_mode_send;
78 // Name: get_common_criteria_config_compare_result
79 // Params:
80 // Returns: int
81 struct get_common_criteria_config_compare_result {
82   std::function<int()> body{[]() { return 0; }};
operatorget_common_criteria_config_compare_result83   int operator()() { return body(); }
84 };
85 extern struct get_common_criteria_config_compare_result get_common_criteria_config_compare_result;
86 // Name: get_remote_device_properties
87 // Params: RawAddress* remote_addr
88 // Returns: int
89 struct get_remote_device_properties {
90   std::function<int(RawAddress* remote_addr)> body{[](RawAddress* /* remote_addr */) { return 0; }};
operatorget_remote_device_properties91   int operator()(RawAddress* remote_addr) { return body(remote_addr); }
92 };
93 extern struct get_remote_device_properties get_remote_device_properties;
94 // Name: get_remote_device_property
95 // Params: RawAddress* remote_addr, bt_property_type_t type
96 // Returns: int
97 struct get_remote_device_property {
98   std::function<int(RawAddress* remote_addr, bt_property_type_t type)> body{
99           [](RawAddress* /* remote_addr */, bt_property_type_t /* type */) { return 0; }};
operatorget_remote_device_property100   int operator()(RawAddress* remote_addr, bt_property_type_t type) {
101     return body(remote_addr, type);
102   }
103 };
104 extern struct get_remote_device_property get_remote_device_property;
105 // Name: get_remote_services
106 // Params: RawAddress* remote_addr
107 // Returns: int
108 struct get_remote_services {
109   std::function<int(RawAddress* remote_addr)> body{[](RawAddress* /* remote_addr */) { return 0; }};
operatorget_remote_services110   int operator()(RawAddress* remote_addr) { return body(remote_addr); }
111 };
112 extern struct get_remote_services get_remote_services;
113 // Name: le_test_mode
114 // Params: uint16_t opcode, uint8_t* buf, uint8_t len
115 // Returns: int
116 struct le_test_mode {
117   std::function<int(uint16_t opcode, uint8_t* buf, uint8_t len)> body{
118           [](uint16_t /* opcode */, uint8_t* /* buf */, uint8_t /* len */) { return 0; }};
operatorle_test_mode119   int operator()(uint16_t opcode, uint8_t* buf, uint8_t len) { return body(opcode, buf, len); }
120 };
121 extern struct le_test_mode le_test_mode;
122 // Name: set_remote_device_property
123 // Params: RawAddress* remote_addr, const bt_property_t* property
124 // Returns: int
125 struct set_remote_device_property {
126   std::function<int(RawAddress* remote_addr, const bt_property_t* property)> body{
127           [](RawAddress* /* remote_addr */, const bt_property_t* /* property */) { return 0; }};
operatorset_remote_device_property128   int operator()(RawAddress* remote_addr, const bt_property_t* property) {
129     return body(remote_addr, property);
130   }
131 };
132 extern struct set_remote_device_property set_remote_device_property;
133 // Name: invoke_switch_buffer_size_cb
134 // Params: bool invoke_switch_buffer_size_cb
135 // Returns: void
136 struct invoke_switch_buffer_size_cb {
137   std::function<void(bool invoke_switch_buffer_size_cb)> body{[](bool) {}};
operatorinvoke_switch_buffer_size_cb138   void operator()(bool invoke_switch_buffer_size_cb) { body(invoke_switch_buffer_size_cb); }
139 };
140 extern struct invoke_switch_buffer_size_cb invoke_switch_buffer_size_cb;
141 
142 }  // namespace btif_bluetooth
143 }  // namespace mock
144 }  // namespace test
145 
146 // END mockcify generation
147