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:18 21 * 22 * mockcify.pl ver 0.6.0 23 */ 24 #include <cstdint> 25 #include <functional> 26 27 // Original included files, if any 28 #include <cstdint> 29 #include <functional> 30 31 #include "include/hardware/bluetooth.h" 32 #include "stack/include/bt_dev_class.h" 33 34 // Original usings 35 36 // Mocked compile conditionals, if any 37 38 namespace test { 39 namespace mock { 40 namespace btif_util { 41 42 // Shared state between mocked functions and tests 43 // Name: ascii_2_hex 44 // Params: const char* p_ascii, int len, uint8_t* p_hex 45 // Return: int 46 struct ascii_2_hex { 47 static int return_value; 48 std::function<int(const char* p_ascii, int len, uint8_t* p_hex)> body{ 49 [](const char* /* p_ascii */, int /* len */, uint8_t* /* p_hex */) { 50 return return_value; 51 }}; operatorascii_2_hex52 int operator()(const char* p_ascii, int len, uint8_t* p_hex) { return body(p_ascii, len, p_hex); } 53 }; 54 extern struct ascii_2_hex ascii_2_hex; 55 56 // Name: devclass2uint 57 // Params: DEV_CLASS dev_class 58 // Return: uint32_t 59 struct devclass2uint { 60 static uint32_t return_value; 61 std::function<uint32_t(DEV_CLASS dev_class)> body{ 62 [](DEV_CLASS /* dev_class */) { return return_value; }}; operatordevclass2uint63 uint32_t operator()(DEV_CLASS dev_class) { return body(dev_class); } 64 }; 65 extern struct devclass2uint devclass2uint; 66 67 // Name: dump_adapter_scan_mode 68 // Params: bt_scan_mode_t mode 69 // Return: const char* 70 struct dump_adapter_scan_mode { 71 static const char* return_value; 72 std::function<const char*(bt_scan_mode_t mode)> body{ 73 [](bt_scan_mode_t /* mode */) { return return_value; }}; operatordump_adapter_scan_mode74 const char* operator()(bt_scan_mode_t mode) { return body(mode); } 75 }; 76 extern struct dump_adapter_scan_mode dump_adapter_scan_mode; 77 78 // Name: dump_av_audio_state 79 // Params: uint16_t event 80 // Return: const char* 81 struct dump_av_audio_state { 82 static const char* return_value; 83 std::function<const char*(uint16_t event)> body{ 84 [](uint16_t /* event */) { return return_value; }}; operatordump_av_audio_state85 const char* operator()(uint16_t event) { return body(event); } 86 }; 87 extern struct dump_av_audio_state dump_av_audio_state; 88 89 // Name: dump_av_conn_state 90 // Params: uint16_t event 91 // Return: const char* 92 struct dump_av_conn_state { 93 static const char* return_value; 94 std::function<const char*(uint16_t event)> body{ 95 [](uint16_t /* event */) { return return_value; }}; operatordump_av_conn_state96 const char* operator()(uint16_t event) { return body(event); } 97 }; 98 extern struct dump_av_conn_state dump_av_conn_state; 99 100 // Name: dump_bt_status 101 // Params: bt_status_t status 102 // Return: const char* 103 struct dump_bt_status { 104 static const char* return_value; 105 std::function<const char*(bt_status_t status)> body{ 106 [](bt_status_t /* status */) { return return_value; }}; operatordump_bt_status107 const char* operator()(bt_status_t status) { return body(status); } 108 }; 109 extern struct dump_bt_status dump_bt_status; 110 111 // Name: dump_dm_event 112 // Params: uint16_t event 113 // Return: const char* 114 struct dump_dm_event { 115 static const char* return_value; 116 std::function<const char*(uint16_t event)> body{ 117 [](uint16_t /* event */) { return return_value; }}; operatordump_dm_event118 const char* operator()(uint16_t event) { return body(event); } 119 }; 120 extern struct dump_dm_event dump_dm_event; 121 122 // Name: dump_dm_search_event 123 // Params: uint16_t event 124 // Return: const char* 125 struct dump_dm_search_event { 126 static const char* return_value; 127 std::function<const char*(uint16_t event)> body{ 128 [](uint16_t /* event */) { return return_value; }}; operatordump_dm_search_event129 const char* operator()(uint16_t event) { return body(event); } 130 }; 131 extern struct dump_dm_search_event dump_dm_search_event; 132 133 // Name: dump_hd_event 134 // Params: uint16_t event 135 // Return: const char* 136 struct dump_hd_event { 137 static const char* return_value; 138 std::function<const char*(uint16_t event)> body{ 139 [](uint16_t /* event */) { return return_value; }}; operatordump_hd_event140 const char* operator()(uint16_t event) { return body(event); } 141 }; 142 extern struct dump_hd_event dump_hd_event; 143 144 // Name: dump_hf_client_event 145 // Params: uint16_t event 146 // Return: const char* 147 struct dump_hf_client_event { 148 static const char* return_value; 149 std::function<const char*(uint16_t event)> body{ 150 [](uint16_t /* event */) { return return_value; }}; operatordump_hf_client_event151 const char* operator()(uint16_t event) { return body(event); } 152 }; 153 extern struct dump_hf_client_event dump_hf_client_event; 154 155 // Name: dump_hf_event 156 // Params: uint16_t event 157 // Return: const char* 158 struct dump_hf_event { 159 static const char* return_value; 160 std::function<const char*(uint16_t event)> body{ 161 [](uint16_t /* event */) { return return_value; }}; operatordump_hf_event162 const char* operator()(uint16_t event) { return body(event); } 163 }; 164 165 // Name: dump_property_type 166 // Params: bt_property_type_t type 167 // Return: const char* 168 struct dump_property_type { 169 static const char* return_value; 170 std::function<const char*(bt_property_type_t type)> body{ 171 [](bt_property_type_t /* type */) { return return_value; }}; operatordump_property_type172 const char* operator()(bt_property_type_t type) { return body(type); } 173 }; 174 extern struct dump_property_type dump_property_type; 175 176 // Name: dump_rc_event 177 // Params: uint8_t event 178 // Return: const char* 179 struct dump_rc_event { 180 static const char* return_value; 181 std::function<const char*(uint8_t event)> body{[](uint8_t /* event */) { return return_value; }}; operatordump_rc_event182 const char* operator()(uint8_t event) { return body(event); } 183 }; 184 extern struct dump_rc_event dump_rc_event; 185 186 // Name: dump_rc_notification_event_id 187 // Params: uint8_t event_id 188 // Return: const char* 189 struct dump_rc_notification_event_id { 190 static const char* return_value; 191 std::function<const char*(uint8_t event_id)> body{ 192 [](uint8_t /* event_id */) { return return_value; }}; operatordump_rc_notification_event_id193 const char* operator()(uint8_t event_id) { return body(event_id); } 194 }; 195 extern struct dump_rc_notification_event_id dump_rc_notification_event_id; 196 197 // Name: dump_rc_pdu 198 // Params: uint8_t pdu 199 // Return: const char* 200 struct dump_rc_pdu { 201 static const char* return_value; 202 std::function<const char*(uint8_t pdu)> body{[](uint8_t /* pdu */) { return return_value; }}; operatordump_rc_pdu203 const char* operator()(uint8_t pdu) { return body(pdu); } 204 }; 205 extern struct dump_rc_pdu dump_rc_pdu; 206 207 // Name: dump_thread_evt 208 // Params: bt_cb_thread_evt evt 209 // Return: const char* 210 struct dump_thread_evt { 211 static const char* return_value; 212 std::function<const char*(bt_cb_thread_evt evt)> body{ 213 [](bt_cb_thread_evt /* evt */) { return return_value; }}; operatordump_thread_evt214 const char* operator()(bt_cb_thread_evt evt) { return body(evt); } 215 }; 216 extern struct dump_thread_evt dump_thread_evt; 217 218 // Name: uint2devclass 219 // Params: uint32_t cod, DEV_CLASS dev_class 220 // Return: void 221 struct uint2devclass { 222 static constexpr DEV_CLASS return_value{}; 223 std::function<DEV_CLASS(uint32_t cod)> body{[](uint32_t /* cod */) { return return_value; }}; operatoruint2devclass224 DEV_CLASS operator()(uint32_t cod) { return body(cod); } 225 }; 226 extern struct uint2devclass uint2devclass; 227 228 } // namespace btif_util 229 } // namespace mock 230 } // namespace test 231 232 // END mockcify generation 233