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 /*
17 * Generated mock file from original source file
18 * Functions generated:18
19 *
20 * mockcify.pl ver 0.6.0
21 */
22 // Mock include file to share data between tests and mock
23 #include "test/mock/mock_btif_util.h"
24
25 #include <cstdint>
26
27 #include "test/common/mock_functions.h"
28
29 // Original usings
30
31 // Mocked internal structures, if any
32
33 namespace test {
34 namespace mock {
35 namespace btif_util {
36
37 // Function state capture and return values, if needed
38 struct ascii_2_hex ascii_2_hex;
39 struct devclass2uint devclass2uint;
40 struct dump_adapter_scan_mode dump_adapter_scan_mode;
41 struct dump_av_audio_state dump_av_audio_state;
42 struct dump_av_conn_state dump_av_conn_state;
43 struct dump_bt_status dump_bt_status;
44 struct dump_dm_event dump_dm_event;
45 struct dump_dm_search_event dump_dm_search_event;
46 struct dump_hd_event dump_hd_event;
47 struct dump_hf_client_event dump_hf_client_event;
48 struct dump_hf_event dump_hf_event;
49 struct dump_property_type dump_property_type;
50 struct dump_rc_event dump_rc_event;
51 struct dump_rc_notification_event_id dump_rc_notification_event_id;
52 struct dump_rc_pdu dump_rc_pdu;
53 struct dump_thread_evt dump_thread_evt;
54 struct uint2devclass uint2devclass;
55
56 } // namespace btif_util
57 } // namespace mock
58 } // namespace test
59
60 // Mocked function return values, if any
61 namespace test {
62 namespace mock {
63 namespace btif_util {
64
65 int ascii_2_hex::return_value = 0;
66 uint32_t devclass2uint::return_value = 0;
67 const char* dump_adapter_scan_mode::return_value = nullptr;
68 const char* dump_av_audio_state::return_value = nullptr;
69 const char* dump_av_conn_state::return_value = nullptr;
70 const char* dump_bt_status::return_value = nullptr;
71 const char* dump_dm_event::return_value = nullptr;
72 const char* dump_dm_search_event::return_value = nullptr;
73 const char* dump_hd_event::return_value = nullptr;
74 const char* dump_hf_client_event::return_value = nullptr;
75 const char* dump_hf_event::return_value = nullptr;
76 const char* dump_property_type::return_value = nullptr;
77 const char* dump_rc_event::return_value = nullptr;
78 const char* dump_rc_notification_event_id::return_value = nullptr;
79 const char* dump_rc_pdu::return_value = nullptr;
80 const char* dump_thread_evt::return_value = nullptr;
81
82 } // namespace btif_util
83 } // namespace mock
84 } // namespace test
85
86 // Mocked functions, if any
ascii_2_hex(const char * p_ascii,int len,uint8_t * p_hex)87 int ascii_2_hex(const char* p_ascii, int len, uint8_t* p_hex) {
88 inc_func_call_count(__func__);
89 return test::mock::btif_util::ascii_2_hex(p_ascii, len, p_hex);
90 }
devclass2uint(const DEV_CLASS dev_class)91 uint32_t devclass2uint(const DEV_CLASS dev_class) {
92 inc_func_call_count(__func__);
93 return test::mock::btif_util::devclass2uint(dev_class);
94 }
dump_adapter_scan_mode(bt_scan_mode_t mode)95 const char* dump_adapter_scan_mode(bt_scan_mode_t mode) {
96 inc_func_call_count(__func__);
97 return test::mock::btif_util::dump_adapter_scan_mode(mode);
98 }
dump_av_audio_state(uint16_t event)99 const char* dump_av_audio_state(uint16_t event) {
100 inc_func_call_count(__func__);
101 return test::mock::btif_util::dump_av_audio_state(event);
102 }
dump_av_conn_state(uint16_t event)103 const char* dump_av_conn_state(uint16_t event) {
104 inc_func_call_count(__func__);
105 return test::mock::btif_util::dump_av_conn_state(event);
106 }
dump_bt_status(bt_status_t status)107 const char* dump_bt_status(bt_status_t status) {
108 inc_func_call_count(__func__);
109 return test::mock::btif_util::dump_bt_status(status);
110 }
dump_dm_event(uint16_t event)111 const char* dump_dm_event(uint16_t event) {
112 inc_func_call_count(__func__);
113 return test::mock::btif_util::dump_dm_event(event);
114 }
dump_dm_search_event(uint16_t event)115 const char* dump_dm_search_event(uint16_t event) {
116 inc_func_call_count(__func__);
117 return test::mock::btif_util::dump_dm_search_event(event);
118 }
dump_hd_event(uint16_t event)119 const char* dump_hd_event(uint16_t event) {
120 inc_func_call_count(__func__);
121 return test::mock::btif_util::dump_hd_event(event);
122 }
dump_hf_client_event(uint16_t event)123 const char* dump_hf_client_event(uint16_t event) {
124 inc_func_call_count(__func__);
125 return test::mock::btif_util::dump_hf_client_event(event);
126 }
dump_hf_event(uint16_t event)127 const char* dump_hf_event(uint16_t event) {
128 inc_func_call_count(__func__);
129 return test::mock::btif_util::dump_hf_event(event);
130 }
dump_property_type(bt_property_type_t type)131 const char* dump_property_type(bt_property_type_t type) {
132 inc_func_call_count(__func__);
133 return test::mock::btif_util::dump_property_type(type);
134 }
dump_rc_event(uint8_t event)135 const char* dump_rc_event(uint8_t event) {
136 inc_func_call_count(__func__);
137 return test::mock::btif_util::dump_rc_event(event);
138 }
dump_rc_notification_event_id(uint8_t event_id)139 const char* dump_rc_notification_event_id(uint8_t event_id) {
140 inc_func_call_count(__func__);
141 return test::mock::btif_util::dump_rc_notification_event_id(event_id);
142 }
dump_rc_pdu(uint8_t pdu)143 const char* dump_rc_pdu(uint8_t pdu) {
144 inc_func_call_count(__func__);
145 return test::mock::btif_util::dump_rc_pdu(pdu);
146 }
dump_thread_evt(bt_cb_thread_evt evt)147 const char* dump_thread_evt(bt_cb_thread_evt evt) {
148 inc_func_call_count(__func__);
149 return test::mock::btif_util::dump_thread_evt(evt);
150 }
uint2devclass(uint32_t cod)151 DEV_CLASS uint2devclass(uint32_t cod) {
152 inc_func_call_count(__func__);
153 return test::mock::btif_util::uint2devclass(cod);
154 }
155 // Mocked functions complete
156 // END mockcify generation
157