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 // Mock include file to share data between tests and mock
24 #include "test/mock/mock_btif_bluetooth.h"
25 
26 #include <cstdint>
27 
28 #include "test/common/mock_functions.h"
29 #include "types/raw_address.h"
30 
31 // Mocked compile conditionals, if any
32 // Mocked internal structures, if any
33 
34 // TODO(b/369381361) Enfore -Wmissing-prototypes
35 #pragma GCC diagnostic ignored "-Wmissing-prototypes"
36 
37 namespace test {
38 namespace mock {
39 namespace btif_bluetooth {
40 
41 // Function state capture and return values, if needed
42 struct is_atv_device is_atv_device;
43 struct is_common_criteria_mode is_common_criteria_mode;
44 struct is_restricted_mode is_restricted_mode;
45 struct dut_mode_configure dut_mode_configure;
46 struct dut_mode_send dut_mode_send;
47 struct get_common_criteria_config_compare_result get_common_criteria_config_compare_result;
48 struct get_remote_device_properties get_remote_device_properties;
49 struct get_remote_device_property get_remote_device_property;
50 struct get_remote_services get_remote_services;
51 struct le_test_mode le_test_mode;
52 struct set_remote_device_property set_remote_device_property;
53 struct invoke_switch_buffer_size_cb invoke_switch_buffer_size_cb;
54 
55 }  // namespace btif_bluetooth
56 }  // namespace mock
57 }  // namespace test
58 
59 // Mocked functions, if any
is_atv_device()60 bool is_atv_device() {
61   inc_func_call_count(__func__);
62   return test::mock::btif_bluetooth::is_atv_device();
63 }
is_common_criteria_mode()64 bool is_common_criteria_mode() {
65   inc_func_call_count(__func__);
66   return test::mock::btif_bluetooth::is_common_criteria_mode();
67 }
is_restricted_mode()68 bool is_restricted_mode() {
69   inc_func_call_count(__func__);
70   return test::mock::btif_bluetooth::is_restricted_mode();
71 }
dut_mode_configure(uint8_t enable)72 int dut_mode_configure(uint8_t enable) {
73   inc_func_call_count(__func__);
74   return test::mock::btif_bluetooth::dut_mode_configure(enable);
75 }
dut_mode_send(uint16_t opcode,uint8_t * buf,uint8_t len)76 int dut_mode_send(uint16_t opcode, uint8_t* buf, uint8_t len) {
77   inc_func_call_count(__func__);
78   return test::mock::btif_bluetooth::dut_mode_send(opcode, buf, len);
79 }
get_common_criteria_config_compare_result()80 int get_common_criteria_config_compare_result() {
81   inc_func_call_count(__func__);
82   return test::mock::btif_bluetooth::get_common_criteria_config_compare_result();
83 }
get_remote_device_properties(RawAddress * remote_addr)84 int get_remote_device_properties(RawAddress* remote_addr) {
85   inc_func_call_count(__func__);
86   return test::mock::btif_bluetooth::get_remote_device_properties(remote_addr);
87 }
get_remote_device_property(RawAddress * remote_addr,bt_property_type_t type)88 int get_remote_device_property(RawAddress* remote_addr, bt_property_type_t type) {
89   inc_func_call_count(__func__);
90   return test::mock::btif_bluetooth::get_remote_device_property(remote_addr, type);
91 }
get_remote_services(RawAddress * remote_addr)92 int get_remote_services(RawAddress* remote_addr) {
93   inc_func_call_count(__func__);
94   return test::mock::btif_bluetooth::get_remote_services(remote_addr);
95 }
le_test_mode(uint16_t opcode,uint8_t * buf,uint8_t len)96 int le_test_mode(uint16_t opcode, uint8_t* buf, uint8_t len) {
97   inc_func_call_count(__func__);
98   return test::mock::btif_bluetooth::le_test_mode(opcode, buf, len);
99 }
set_remote_device_property(RawAddress * remote_addr,const bt_property_t * property)100 int set_remote_device_property(RawAddress* remote_addr, const bt_property_t* property) {
101   inc_func_call_count(__func__);
102   return test::mock::btif_bluetooth::set_remote_device_property(remote_addr, property);
103 }
invoke_switch_buffer_size_cb(bool invoke_switch_buffer_size_cb)104 void invoke_switch_buffer_size_cb(bool invoke_switch_buffer_size_cb) {
105   inc_func_call_count(__func__);
106   test::mock::btif_bluetooth::invoke_switch_buffer_size_cb(invoke_switch_buffer_size_cb);
107 }
108 
109 // END mockcify generation
110