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 #include "test/common/mock_functions.h" 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 "include/hardware/bluetooth.h" 38 #include "types/raw_address.h" 39 40 // Mocked compile conditionals, if any 41 #ifndef UNUSED_ATTR 42 #define UNUSED_ATTR 43 #endif 44 45 namespace test { 46 namespace mock { 47 namespace btif_bluetooth { 48 49 // Shared state between mocked functions and tests 50 // Name: is_atv_device 51 // Params: 52 // Returns: bool 53 struct is_atv_device { 54 std::function<bool()> body{[]() { return false; }}; operatoris_atv_device55 bool operator()() { return body(); }; 56 }; 57 extern struct is_atv_device is_atv_device; 58 // Name: is_common_criteria_mode 59 // Params: 60 // Returns: bool 61 struct is_common_criteria_mode { 62 std::function<bool()> body{[]() { return false; }}; operatoris_common_criteria_mode63 bool operator()() { return body(); }; 64 }; 65 extern struct is_common_criteria_mode is_common_criteria_mode; 66 // Name: is_restricted_mode 67 // Params: 68 // Returns: bool 69 struct is_restricted_mode { 70 std::function<bool()> body{[]() { return false; }}; operatoris_restricted_mode71 bool operator()() { return body(); }; 72 }; 73 extern struct is_restricted_mode is_restricted_mode; 74 // Name: get_common_criteria_config_compare_result 75 // Params: 76 // Returns: int 77 struct get_common_criteria_config_compare_result { 78 std::function<int()> body{[]() { return 0; }}; operatorget_common_criteria_config_compare_result79 int operator()() { return body(); }; 80 }; 81 extern struct get_common_criteria_config_compare_result 82 get_common_criteria_config_compare_result; 83 // Name: get_remote_device_properties 84 // Params: RawAddress* remote_addr 85 // Returns: int 86 struct get_remote_device_properties { 87 std::function<int(RawAddress* remote_addr)> body{ 88 [](RawAddress* remote_addr) { return 0; }}; operatorget_remote_device_properties89 int operator()(RawAddress* remote_addr) { return body(remote_addr); }; 90 }; 91 extern struct get_remote_device_properties get_remote_device_properties; 92 // Name: get_remote_device_property 93 // Params: RawAddress* remote_addr, bt_property_type_t type 94 // Returns: int 95 struct get_remote_device_property { 96 std::function<int(RawAddress* remote_addr, bt_property_type_t type)> body{ 97 [](RawAddress* remote_addr, bt_property_type_t type) { return 0; }}; operatorget_remote_device_property98 int operator()(RawAddress* remote_addr, bt_property_type_t type) { 99 return body(remote_addr, type); 100 }; 101 }; 102 extern struct get_remote_device_property get_remote_device_property; 103 // Name: get_remote_services 104 // Params: RawAddress* remote_addr 105 // Returns: int 106 struct get_remote_services { 107 std::function<int(RawAddress* remote_addr)> body{ 108 [](RawAddress* remote_addr) { return 0; }}; operatorget_remote_services109 int operator()(RawAddress* remote_addr) { return body(remote_addr); }; 110 }; 111 extern struct get_remote_services get_remote_services; 112 // Name: set_remote_device_property 113 // Params: RawAddress* remote_addr, const bt_property_t* property 114 // Returns: int 115 struct set_remote_device_property { 116 std::function<int(RawAddress* remote_addr, const bt_property_t* property)> 117 body{[](RawAddress* remote_addr, const bt_property_t* property) { 118 return 0; 119 }}; operatorset_remote_device_property120 int operator()(RawAddress* remote_addr, const bt_property_t* property) { 121 return body(remote_addr, property); 122 }; 123 }; 124 extern struct set_remote_device_property set_remote_device_property; 125 // Name: set_hal_cbacks 126 // Params: bt_callbacks_t* callbacks 127 // Returns: void 128 struct set_hal_cbacks { 129 std::function<void(bt_callbacks_t* callbacks)> body{ 130 [](bt_callbacks_t* callbacks) { ; }}; operatorset_hal_cbacks131 void operator()(bt_callbacks_t* callbacks) { body(callbacks); }; 132 }; 133 extern struct set_hal_cbacks set_hal_cbacks; 134 135 } // namespace btif_bluetooth 136 } // namespace mock 137 } // namespace test 138 139 // END mockcify generation 140