1 /* 2 * Copyright 2023 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 #pragma once 17 18 /* 19 * Generated mock file from original source file 20 * Functions generated:43 21 * 22 * mockcify.pl ver 0.6.0 23 */ 24 25 #include <cstdint> 26 #include <functional> 27 28 // Original included files, if any 29 30 #include <stddef.h> 31 #include <stdlib.h> 32 #include <string.h> 33 34 #include "stack/btm/neighbor_inquiry.h" 35 #include "stack/include/bt_hdr.h" 36 #include "stack/include/btm_status.h" 37 #include "stack/rnr/remote_name_request.h" 38 #include "types/bluetooth/uuid.h" 39 #include "types/bt_transport.h" 40 #include "types/raw_address.h" 41 42 // Original usings 43 using bluetooth::Uuid; 44 45 // Mocked compile conditionals, if any 46 47 namespace test { 48 namespace mock { 49 namespace stack_btm_inq { 50 51 // Name: BTM_CancelInquiry 52 // Params: void 53 // Return: void 54 struct BTM_CancelInquiry { 55 std::function<void(void)> body{[](void) {}}; operatorBTM_CancelInquiry56 void operator()(void) { body(); } 57 }; 58 extern struct BTM_CancelInquiry BTM_CancelInquiry; 59 60 // Name: BTM_EnableInterlacedInquiryScan 61 // Params: 62 // Return: void 63 struct BTM_EnableInterlacedInquiryScan { 64 std::function<void()> body{[]() {}}; operatorBTM_EnableInterlacedInquiryScan65 void operator()() { body(); } 66 }; 67 extern struct BTM_EnableInterlacedInquiryScan BTM_EnableInterlacedInquiryScan; 68 69 // Name: BTM_EnableInterlacedPageScan 70 // Params: 71 // Return: void 72 struct BTM_EnableInterlacedPageScan { 73 std::function<void()> body{[]() {}}; operatorBTM_EnableInterlacedPageScan74 void operator()() { body(); } 75 }; 76 extern struct BTM_EnableInterlacedPageScan BTM_EnableInterlacedPageScan; 77 78 // Name: BTM_HasEirService 79 // Params: const uint32_t* p_eir_uuid, uint16_t uuid16 80 // Return: bool 81 struct BTM_HasEirService { 82 static bool return_value; 83 std::function<bool(const uint32_t* p_eir_uuid, uint16_t uuid16)> body{ 84 [](const uint32_t* /* p_eir_uuid */, uint16_t /* uuid16 */) { return return_value; }}; operatorBTM_HasEirService85 bool operator()(const uint32_t* p_eir_uuid, uint16_t uuid16) { return body(p_eir_uuid, uuid16); } 86 }; 87 extern struct BTM_HasEirService BTM_HasEirService; 88 89 // Name: BTM_IsInquiryActive 90 // Params: void 91 // Return: uint16_t 92 struct BTM_IsInquiryActive { 93 static uint16_t return_value; 94 std::function<uint16_t(void)> body{[](void) { return return_value; }}; operatorBTM_IsInquiryActive95 uint16_t operator()(void) { return body(); } 96 }; 97 extern struct BTM_IsInquiryActive BTM_IsInquiryActive; 98 99 // Name: BTM_SetConnectability 100 // Params: uint16_t page_mode 101 // Return: tBTM_STATUS 102 struct BTM_SetConnectability { 103 static tBTM_STATUS return_value; 104 std::function<tBTM_STATUS(uint16_t page_mode)> body{ 105 [](uint16_t /* page_mode */) { return return_value; }}; operatorBTM_SetConnectability106 tBTM_STATUS operator()(uint16_t page_mode) { return body(page_mode); } 107 }; 108 extern struct BTM_SetConnectability BTM_SetConnectability; 109 110 // Name: BTM_SetDiscoverability 111 // Params: uint16_t inq_mode 112 // Return: tBTM_STATUS 113 struct BTM_SetDiscoverability { 114 static tBTM_STATUS return_value; 115 std::function<tBTM_STATUS(uint16_t inq_mode)> body{ 116 [](uint16_t /* inq_mode */) { return return_value; }}; operatorBTM_SetDiscoverability117 tBTM_STATUS operator()(uint16_t inq_mode) { return body(inq_mode); } 118 }; 119 extern struct BTM_SetDiscoverability BTM_SetDiscoverability; 120 121 // Name: BTM_SetInquiryMode 122 // Params: uint8_t mode 123 // Return: tBTM_STATUS 124 struct BTM_SetInquiryMode { 125 static tBTM_STATUS return_value; 126 std::function<tBTM_STATUS(uint8_t mode)> body{[](uint8_t /* mode */) { return return_value; }}; operatorBTM_SetInquiryMode127 tBTM_STATUS operator()(uint8_t mode) { return body(mode); } 128 }; 129 extern struct BTM_SetInquiryMode BTM_SetInquiryMode; 130 131 // Name: BTM_StartInquiry 132 // Params: tBTM_INQ_RESULTS_CB* p_results_cb, tBTM_CMPL_CB* p_cmpl_cb 133 // Return: tBTM_STATUS 134 struct BTM_StartInquiry { 135 static tBTM_STATUS return_value; 136 std::function<tBTM_STATUS(tBTM_INQ_RESULTS_CB* p_results_cb, tBTM_CMPL_CB* p_cmpl_cb)> body{ 137 [](tBTM_INQ_RESULTS_CB* /* p_results_cb */, tBTM_CMPL_CB* /* p_cmpl_cb */) { 138 return return_value; 139 }}; operatorBTM_StartInquiry140 tBTM_STATUS operator()(tBTM_INQ_RESULTS_CB* p_results_cb, tBTM_CMPL_CB* p_cmpl_cb) { 141 return body(p_results_cb, p_cmpl_cb); 142 } 143 }; 144 extern struct BTM_StartInquiry BTM_StartInquiry; 145 146 // Name: btm_clr_inq_result_flt 147 // Params: void 148 // Return: void 149 struct btm_clr_inq_result_flt { 150 std::function<void(void)> body{[](void) {}}; operatorbtm_clr_inq_result_flt151 void operator()(void) { body(); } 152 }; 153 extern struct btm_clr_inq_result_flt btm_clr_inq_result_flt; 154 155 // Name: btm_inq_db_find 156 // Params: const RawAddress& p_bda 157 // Return: tINQ_DB_ENT* 158 struct btm_inq_db_find { 159 static tINQ_DB_ENT* return_value; 160 std::function<tINQ_DB_ENT*(const RawAddress& p_bda)> body{ 161 [](const RawAddress& /* p_bda */) { return return_value; }}; operatorbtm_inq_db_find162 tINQ_DB_ENT* operator()(const RawAddress& p_bda) { return body(p_bda); } 163 }; 164 extern struct btm_inq_db_find btm_inq_db_find; 165 166 // Name: btm_inq_db_new 167 // Params: const RawAddress& p_bda 168 // Return: tINQ_DB_ENT* 169 struct btm_inq_db_new { 170 static tINQ_DB_ENT* return_value; 171 std::function<tINQ_DB_ENT*(const RawAddress& p_bda, bool is_ble)> body{ 172 [](const RawAddress& /* p_bda */, bool /* is_ble */) { return return_value; }}; operatorbtm_inq_db_new173 tINQ_DB_ENT* operator()(const RawAddress& p_bda, bool is_ble) { return body(p_bda, is_ble); } 174 }; 175 extern struct btm_inq_db_new btm_inq_db_new; 176 177 // Name: btm_inq_db_reset 178 // Params: void 179 // Return: void 180 struct btm_inq_db_reset { 181 std::function<void(void)> body{[](void) {}}; operatorbtm_inq_db_reset182 void operator()(void) { body(); } 183 }; 184 extern struct btm_inq_db_reset btm_inq_db_reset; 185 186 // Name: btm_inq_find_bdaddr 187 // Params: const RawAddress& p_bda 188 // Return: bool 189 struct btm_inq_find_bdaddr { 190 static bool return_value; 191 std::function<bool(const RawAddress& p_bda)> body{ 192 [](const RawAddress& /* p_bda */) { return return_value; }}; operatorbtm_inq_find_bdaddr193 bool operator()(const RawAddress& p_bda) { return body(p_bda); } 194 }; 195 extern struct btm_inq_find_bdaddr btm_inq_find_bdaddr; 196 197 // Name: btm_process_inq_complete 198 // Params: tHCI_STATUS status, uint8_t mode 199 // Return: void 200 struct btm_process_inq_complete { 201 std::function<void(tHCI_STATUS status, uint8_t mode)> body{ 202 [](tHCI_STATUS /* status */, uint8_t /* mode */) {}}; operatorbtm_process_inq_complete203 void operator()(tHCI_STATUS status, uint8_t mode) { body(status, mode); } 204 }; 205 extern struct btm_process_inq_complete btm_process_inq_complete; 206 207 } // namespace stack_btm_inq 208 } // namespace mock 209 } // namespace test 210 211 // END mockcify generation 212