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:5
20 *
21 * mockcify.pl ver 0.7.0
22 */
23
24 // Mock include file to share data between tests and mock
25 #include "test/mock/mock_main_shim_hci_layer.h"
26
27 #include "main/shim/hci_layer.h"
28 #include "test/common/mock_functions.h"
29
30 // Original usings
31
32 // Mocked internal structures, if any
33
34 // TODO(b/369381361) Enfore -Wmissing-prototypes
35 #pragma GCC diagnostic ignored "-Wmissing-prototypes"
36
37 namespace bluetooth::shim {
38 namespace testing {
39 const hci_t* test_interface = nullptr;
hci_layer_set_interface(const hci_t * interface)40 void hci_layer_set_interface(const hci_t* interface) { test_interface = interface; }
41 } // namespace testing
42 } // namespace bluetooth::shim
43
hci_layer_get_interface()44 const hci_t* bluetooth::shim::hci_layer_get_interface() { return testing::test_interface; }
45
46 namespace test {
47 namespace mock {
48 namespace main_shim_hci_layer {
49
50 // Function state capture and return values, if needed
51 struct OnTransmitPacketCommandComplete OnTransmitPacketCommandComplete;
52 struct OnTransmitPacketStatus OnTransmitPacketStatus;
53 struct hci_on_reset_complete hci_on_reset_complete;
54 struct hci_on_shutting_down hci_on_shutting_down;
55
56 } // namespace main_shim_hci_layer
57 } // namespace mock
58 } // namespace test
59
60 // Mocked function return values, if any
61 namespace test {
62 namespace mock {
63 namespace main_shim_hci_layer {} // namespace main_shim_hci_layer
64 } // namespace mock
65 } // namespace test
66
67 // Mocked functions, if any
68 namespace cpp {
OnTransmitPacketCommandComplete(command_complete_cb complete_callback,void * context,bluetooth::hci::CommandCompleteView view)69 void OnTransmitPacketCommandComplete(command_complete_cb complete_callback, void* context,
70 bluetooth::hci::CommandCompleteView view) {
71 inc_func_call_count(__func__);
72 test::mock::main_shim_hci_layer::OnTransmitPacketCommandComplete(complete_callback, context,
73 view);
74 }
OnTransmitPacketStatus(command_status_cb status_callback,void * context,std::unique_ptr<OsiObject> command,bluetooth::hci::CommandStatusView view)75 void OnTransmitPacketStatus(command_status_cb status_callback, void* context,
76 std::unique_ptr<OsiObject> command,
77 bluetooth::hci::CommandStatusView view) {
78 inc_func_call_count(__func__);
79 test::mock::main_shim_hci_layer::OnTransmitPacketStatus(status_callback, context,
80 std::move(command), view);
81 }
82 } // namespace cpp
83
hci_on_reset_complete()84 void bluetooth::shim::hci_on_reset_complete() {
85 inc_func_call_count(__func__);
86 test::mock::main_shim_hci_layer::hci_on_reset_complete();
87 }
hci_on_shutting_down()88 void bluetooth::shim::hci_on_shutting_down() {
89 inc_func_call_count(__func__);
90 test::mock::main_shim_hci_layer::hci_on_shutting_down();
91 }
92 // Mocked functions complete
93 // END mockcify generation
94