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 namespace bluetooth::shim {
35 namespace testing {
36 const hci_t* test_interface = nullptr;
hci_layer_set_interface(const hci_t * interface)37 void hci_layer_set_interface(const hci_t* interface) {
38 test_interface = interface;
39 }
40 } // namespace testing
41 } // namespace bluetooth::shim
42
hci_layer_get_interface()43 const hci_t* bluetooth::shim::hci_layer_get_interface() {
44 return testing::test_interface;
45 }
46
47 namespace test {
48 namespace mock {
49 namespace main_shim_hci_layer {
50
51 // Function state capture and return values, if needed
52 struct OnTransmitPacketCommandComplete OnTransmitPacketCommandComplete;
53 struct OnTransmitPacketStatus OnTransmitPacketStatus;
54 struct hci_on_reset_complete hci_on_reset_complete;
55 struct hci_on_shutting_down hci_on_shutting_down;
56
57 } // namespace main_shim_hci_layer
58 } // namespace mock
59 } // namespace test
60
61 // Mocked function return values, if any
62 namespace test {
63 namespace mock {
64 namespace main_shim_hci_layer {} // namespace main_shim_hci_layer
65 } // namespace mock
66 } // namespace test
67
68 // Mocked functions, if any
69 namespace cpp {
OnTransmitPacketCommandComplete(command_complete_cb complete_callback,void * context,bluetooth::hci::CommandCompleteView view)70 void OnTransmitPacketCommandComplete(command_complete_cb complete_callback,
71 void* context,
72 bluetooth::hci::CommandCompleteView view) {
73 inc_func_call_count(__func__);
74 test::mock::main_shim_hci_layer::OnTransmitPacketCommandComplete(
75 complete_callback, context, view);
76 }
OnTransmitPacketStatus(command_status_cb status_callback,void * context,std::unique_ptr<OsiObject> command,bluetooth::hci::CommandStatusView view)77 void OnTransmitPacketStatus(command_status_cb status_callback, void* context,
78 std::unique_ptr<OsiObject> command,
79 bluetooth::hci::CommandStatusView view) {
80 inc_func_call_count(__func__);
81 test::mock::main_shim_hci_layer::OnTransmitPacketStatus(
82 status_callback, context, std::move(command), view);
83 }
84 } // namespace cpp
85
hci_on_reset_complete()86 void bluetooth::shim::hci_on_reset_complete() {
87 inc_func_call_count(__func__);
88 test::mock::main_shim_hci_layer::hci_on_reset_complete();
89 }
hci_on_shutting_down()90 void bluetooth::shim::hci_on_shutting_down() {
91 inc_func_call_count(__func__);
92 test::mock::main_shim_hci_layer::hci_on_shutting_down();
93 }
94 // Mocked functions complete
95 // END mockcify generation
96