• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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{
66       [](uint8_t /* enable */) { return 0; }};
operatordut_mode_configure67   int operator()(uint8_t enable) { return body(enable); };
68 };
69 extern struct dut_mode_configure dut_mode_configure;
70 // Name: dut_mode_send
71 // Params: uint16_t opcode, uint8_t* buf, uint8_t len
72 // Returns: int
73 struct dut_mode_send {
74   std::function<int(uint16_t /* opcode */, uint8_t* /* buf */,
75                     uint8_t /* len */)>
76       body{[](uint16_t /* opcode */, uint8_t* /* buf */, uint8_t /* len */) {
77         return 0;
78       }};
operatordut_mode_send79   int operator()(uint16_t opcode, uint8_t* buf, uint8_t len) {
80     return body(opcode, buf, len);
81   };
82 };
83 extern struct dut_mode_send dut_mode_send;
84 // Name: get_common_criteria_config_compare_result
85 // Params:
86 // Returns: int
87 struct get_common_criteria_config_compare_result {
88   std::function<int()> body{[]() { return 0; }};
operatorget_common_criteria_config_compare_result89   int operator()() { return body(); };
90 };
91 extern struct get_common_criteria_config_compare_result
92     get_common_criteria_config_compare_result;
93 // Name: get_remote_device_properties
94 // Params: RawAddress* remote_addr
95 // Returns: int
96 struct get_remote_device_properties {
97   std::function<int(RawAddress* remote_addr)> body{
98       [](RawAddress* /* remote_addr */) { return 0; }};
operatorget_remote_device_properties99   int operator()(RawAddress* remote_addr) { return body(remote_addr); };
100 };
101 extern struct get_remote_device_properties get_remote_device_properties;
102 // Name: get_remote_device_property
103 // Params: RawAddress* remote_addr, bt_property_type_t type
104 // Returns: int
105 struct get_remote_device_property {
106   std::function<int(RawAddress* remote_addr, bt_property_type_t type)> body{
107       [](RawAddress* /* remote_addr */, bt_property_type_t /* type */) {
108         return 0;
109       }};
operatorget_remote_device_property110   int operator()(RawAddress* remote_addr, bt_property_type_t type) {
111     return body(remote_addr, type);
112   };
113 };
114 extern struct get_remote_device_property get_remote_device_property;
115 // Name: get_remote_services
116 // Params: RawAddress* remote_addr
117 // Returns: int
118 struct get_remote_services {
119   std::function<int(RawAddress* remote_addr)> body{
120       [](RawAddress* /* remote_addr */) { return 0; }};
operatorget_remote_services121   int operator()(RawAddress* remote_addr) { return body(remote_addr); };
122 };
123 extern struct get_remote_services get_remote_services;
124 // Name: le_test_mode
125 // Params: uint16_t opcode, uint8_t* buf, uint8_t len
126 // Returns: int
127 struct le_test_mode {
128   std::function<int(uint16_t opcode, uint8_t* buf, uint8_t len)> body{
129       [](uint16_t /* opcode */, uint8_t* /* buf */, uint8_t /* len */) {
130         return 0;
131       }};
operatorle_test_mode132   int operator()(uint16_t opcode, uint8_t* buf, uint8_t len) {
133     return body(opcode, buf, len);
134   };
135 };
136 extern struct le_test_mode le_test_mode;
137 // Name: set_remote_device_property
138 // Params: RawAddress* remote_addr, const bt_property_t* property
139 // Returns: int
140 struct set_remote_device_property {
141   std::function<int(RawAddress* remote_addr, const bt_property_t* property)>
142       body{[](RawAddress* /* remote_addr */,
143               const bt_property_t* /* property */) { return 0; }};
operatorset_remote_device_property144   int operator()(RawAddress* remote_addr, const bt_property_t* property) {
145     return body(remote_addr, property);
146   };
147 };
148 extern struct set_remote_device_property set_remote_device_property;
149 // Name: invoke_switch_buffer_size_cb
150 // Params: bool invoke_switch_buffer_size_cb
151 // Returns: void
152 struct invoke_switch_buffer_size_cb {
153   std::function<void(bool invoke_switch_buffer_size_cb)> body{[](bool) {}};
operatorinvoke_switch_buffer_size_cb154   void operator()(bool invoke_switch_buffer_size_cb) {
155     body(invoke_switch_buffer_size_cb);
156   };
157 };
158 extern struct invoke_switch_buffer_size_cb invoke_switch_buffer_size_cb;
159 
160 }  // namespace btif_bluetooth
161 }  // namespace mock
162 }  // namespace test
163 
164 // END mockcify generation
165