• 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 #include <map>
27 #include <string>
28 
29 extern std::map<std::string, int> mock_function_count_map;
30 
31 // Mock include file to share data between tests and mock
32 #include "test/mock/mock_btif_bluetooth.h"
33 #include "types/raw_address.h"
34 
35 // Mocked compile conditionals, if any
36 #ifndef UNUSED_ATTR
37 #define UNUSED_ATTR
38 #endif
39 
40 // Mocked internal structures, if any
41 
42 namespace test {
43 namespace mock {
44 namespace btif_bluetooth {
45 
46 // Function state capture and return values, if needed
47 struct is_atv_device is_atv_device;
48 struct is_common_criteria_mode is_common_criteria_mode;
49 struct is_restricted_mode is_restricted_mode;
50 struct dut_mode_configure dut_mode_configure;
51 struct dut_mode_send dut_mode_send;
52 struct get_common_criteria_config_compare_result
53     get_common_criteria_config_compare_result;
54 struct get_remote_device_properties get_remote_device_properties;
55 struct get_remote_device_property get_remote_device_property;
56 struct get_remote_services get_remote_services;
57 struct le_test_mode le_test_mode;
58 struct set_remote_device_property set_remote_device_property;
59 struct set_hal_cbacks set_hal_cbacks;
60 
61 }  // namespace btif_bluetooth
62 }  // namespace mock
63 }  // namespace test
64 
65 // Mocked functions, if any
is_atv_device()66 bool is_atv_device() {
67   mock_function_count_map[__func__]++;
68   return test::mock::btif_bluetooth::is_atv_device();
69 }
is_common_criteria_mode()70 bool is_common_criteria_mode() {
71   mock_function_count_map[__func__]++;
72   return test::mock::btif_bluetooth::is_common_criteria_mode();
73 }
is_restricted_mode()74 bool is_restricted_mode() {
75   mock_function_count_map[__func__]++;
76   return test::mock::btif_bluetooth::is_restricted_mode();
77 }
dut_mode_configure(uint8_t enable)78 int dut_mode_configure(uint8_t enable) {
79   mock_function_count_map[__func__]++;
80   return test::mock::btif_bluetooth::dut_mode_configure(enable);
81 }
dut_mode_send(uint16_t opcode,uint8_t * buf,uint8_t len)82 int dut_mode_send(uint16_t opcode, uint8_t* buf, uint8_t len) {
83   mock_function_count_map[__func__]++;
84   return test::mock::btif_bluetooth::dut_mode_send(opcode, buf, len);
85 }
get_common_criteria_config_compare_result()86 int get_common_criteria_config_compare_result() {
87   mock_function_count_map[__func__]++;
88   return test::mock::btif_bluetooth::
89       get_common_criteria_config_compare_result();
90 }
get_remote_device_properties(RawAddress * remote_addr)91 int get_remote_device_properties(RawAddress* remote_addr) {
92   mock_function_count_map[__func__]++;
93   return test::mock::btif_bluetooth::get_remote_device_properties(remote_addr);
94 }
get_remote_device_property(RawAddress * remote_addr,bt_property_type_t type)95 int get_remote_device_property(RawAddress* remote_addr,
96                                bt_property_type_t type) {
97   mock_function_count_map[__func__]++;
98   return test::mock::btif_bluetooth::get_remote_device_property(remote_addr,
99                                                                 type);
100 }
get_remote_services(RawAddress * remote_addr)101 int get_remote_services(RawAddress* remote_addr) {
102   mock_function_count_map[__func__]++;
103   return test::mock::btif_bluetooth::get_remote_services(remote_addr);
104 }
le_test_mode(uint16_t opcode,uint8_t * buf,uint8_t len)105 int le_test_mode(uint16_t opcode, uint8_t* buf, uint8_t len) {
106   mock_function_count_map[__func__]++;
107   return test::mock::btif_bluetooth::le_test_mode(opcode, buf, len);
108 }
set_remote_device_property(RawAddress * remote_addr,const bt_property_t * property)109 int set_remote_device_property(RawAddress* remote_addr,
110                                const bt_property_t* property) {
111   mock_function_count_map[__func__]++;
112   return test::mock::btif_bluetooth::set_remote_device_property(remote_addr,
113                                                                 property);
114 }
set_hal_cbacks(bt_callbacks_t * callbacks)115 void set_hal_cbacks(bt_callbacks_t* callbacks) {
116   mock_function_count_map[__func__]++;
117   test::mock::btif_bluetooth::set_hal_cbacks(callbacks);
118 }
119 
120 // END mockcify generation
121