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 #pragma once 18 19 /* 20 * Generated mock file from original source file 21 * Functions generated:5 22 * 23 * mockcify.pl ver 0.7.0 24 */ 25 26 #include <functional> 27 28 #include "hci/include/hci_layer.h" 29 30 // Original included files, if any 31 // NOTE: Since this is a mock file with mock definitions some number of 32 // include files may not be required. The include-what-you-use 33 // still applies, but crafting proper inclusion is out of scope 34 // for this effort. This compilation unit may compile as-is, or 35 // may need attention to prune from (or add to ) the inclusion set. 36 #include <base/functional/bind.h> 37 38 #include "hci/hci_packets.h" 39 #include "osi/include/allocator.h" 40 41 // Original usings 42 using CommandCallbackData = struct { 43 void* context; 44 }; 45 // Mocked compile conditionals, if any 46 47 namespace bluetooth::shim { 48 namespace testing { 49 extern void hci_layer_set_interface(const hci_t* interface); 50 } // namespace testing 51 } // namespace bluetooth::shim 52 53 namespace test { 54 namespace mock { 55 namespace main_shim_hci_layer { 56 57 // Name: hci_layer_get_interface 58 // Params: 59 // Return: const hci_t* 60 struct hci_layer_get_interface { 61 static const hci_t* return_value; 62 std::function<const hci_t*()> body{[]() { return return_value; }}; operatorhci_layer_get_interface63 const hci_t* operator()() { return body(); } 64 }; 65 extern struct hci_layer_get_interface hci_layer_get_interface; 66 67 // Name: hci_on_reset_complete 68 // Params: 69 // Return: void 70 struct hci_on_reset_complete { 71 std::function<void()> body{[]() {}}; operatorhci_on_reset_complete72 void operator()() { body(); } 73 }; 74 extern struct hci_on_reset_complete hci_on_reset_complete; 75 76 // Name: hci_on_shutting_down 77 // Params: 78 // Return: void 79 struct hci_on_shutting_down { 80 std::function<void()> body{[]() {}}; operatorhci_on_shutting_down81 void operator()() { body(); } 82 }; 83 extern struct hci_on_shutting_down hci_on_shutting_down; 84 85 } // namespace main_shim_hci_layer 86 } // namespace mock 87 } // namespace test 88 89 // END mockcify generation 90