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 // TODO(b/369381361) Enfore -Wmissing-prototypes
34 #pragma GCC diagnostic ignored "-Wmissing-prototypes"
35 
36 namespace test {
37 namespace mock {
38 namespace btif_util {
39 
40 // Function state capture and return values, if needed
41 struct ascii_2_hex ascii_2_hex;
42 struct devclass2uint devclass2uint;
43 struct dump_adapter_scan_mode dump_adapter_scan_mode;
44 struct dump_av_audio_state dump_av_audio_state;
45 struct dump_av_conn_state dump_av_conn_state;
46 struct dump_bt_status dump_bt_status;
47 struct dump_dm_event dump_dm_event;
48 struct dump_dm_search_event dump_dm_search_event;
49 struct dump_hd_event dump_hd_event;
50 struct dump_hf_client_event dump_hf_client_event;
51 struct dump_hf_event dump_hf_event;
52 struct dump_property_type dump_property_type;
53 struct dump_rc_event dump_rc_event;
54 struct dump_rc_notification_event_id dump_rc_notification_event_id;
55 struct dump_rc_pdu dump_rc_pdu;
56 struct dump_thread_evt dump_thread_evt;
57 struct uint2devclass uint2devclass;
58 
59 }  // namespace btif_util
60 }  // namespace mock
61 }  // namespace test
62 
63 // Mocked function return values, if any
64 namespace test {
65 namespace mock {
66 namespace btif_util {
67 
68 int ascii_2_hex::return_value = 0;
69 uint32_t devclass2uint::return_value = 0;
70 const char* dump_adapter_scan_mode::return_value = nullptr;
71 const char* dump_av_audio_state::return_value = nullptr;
72 const char* dump_av_conn_state::return_value = nullptr;
73 const char* dump_bt_status::return_value = nullptr;
74 const char* dump_dm_event::return_value = nullptr;
75 const char* dump_dm_search_event::return_value = nullptr;
76 const char* dump_hd_event::return_value = nullptr;
77 const char* dump_hf_client_event::return_value = nullptr;
78 const char* dump_hf_event::return_value = nullptr;
79 const char* dump_property_type::return_value = nullptr;
80 const char* dump_rc_event::return_value = nullptr;
81 const char* dump_rc_notification_event_id::return_value = nullptr;
82 const char* dump_rc_pdu::return_value = nullptr;
83 const char* dump_thread_evt::return_value = nullptr;
84 
85 }  // namespace btif_util
86 }  // namespace mock
87 }  // namespace test
88 
89 // Mocked functions, if any
ascii_2_hex(const char * p_ascii,int len,uint8_t * p_hex)90 int ascii_2_hex(const char* p_ascii, int len, uint8_t* p_hex) {
91   inc_func_call_count(__func__);
92   return test::mock::btif_util::ascii_2_hex(p_ascii, len, p_hex);
93 }
devclass2uint(const DEV_CLASS dev_class)94 uint32_t devclass2uint(const DEV_CLASS dev_class) {
95   inc_func_call_count(__func__);
96   return test::mock::btif_util::devclass2uint(dev_class);
97 }
dump_adapter_scan_mode(bt_scan_mode_t mode)98 const char* dump_adapter_scan_mode(bt_scan_mode_t mode) {
99   inc_func_call_count(__func__);
100   return test::mock::btif_util::dump_adapter_scan_mode(mode);
101 }
dump_av_audio_state(uint16_t event)102 const char* dump_av_audio_state(uint16_t event) {
103   inc_func_call_count(__func__);
104   return test::mock::btif_util::dump_av_audio_state(event);
105 }
dump_av_conn_state(uint16_t event)106 const char* dump_av_conn_state(uint16_t event) {
107   inc_func_call_count(__func__);
108   return test::mock::btif_util::dump_av_conn_state(event);
109 }
dump_bt_status(bt_status_t status)110 const char* dump_bt_status(bt_status_t status) {
111   inc_func_call_count(__func__);
112   return test::mock::btif_util::dump_bt_status(status);
113 }
dump_dm_event(uint16_t event)114 const char* dump_dm_event(uint16_t event) {
115   inc_func_call_count(__func__);
116   return test::mock::btif_util::dump_dm_event(event);
117 }
dump_dm_search_event(uint16_t event)118 const char* dump_dm_search_event(uint16_t event) {
119   inc_func_call_count(__func__);
120   return test::mock::btif_util::dump_dm_search_event(event);
121 }
dump_hd_event(uint16_t event)122 const char* dump_hd_event(uint16_t event) {
123   inc_func_call_count(__func__);
124   return test::mock::btif_util::dump_hd_event(event);
125 }
dump_hf_client_event(uint16_t event)126 const char* dump_hf_client_event(uint16_t event) {
127   inc_func_call_count(__func__);
128   return test::mock::btif_util::dump_hf_client_event(event);
129 }
dump_hf_event(uint16_t event)130 const char* dump_hf_event(uint16_t event) {
131   inc_func_call_count(__func__);
132   return test::mock::btif_util::dump_hf_event(event);
133 }
dump_property_type(bt_property_type_t type)134 const char* dump_property_type(bt_property_type_t type) {
135   inc_func_call_count(__func__);
136   return test::mock::btif_util::dump_property_type(type);
137 }
dump_rc_event(uint8_t event)138 const char* dump_rc_event(uint8_t event) {
139   inc_func_call_count(__func__);
140   return test::mock::btif_util::dump_rc_event(event);
141 }
dump_rc_notification_event_id(uint8_t event_id)142 const char* dump_rc_notification_event_id(uint8_t event_id) {
143   inc_func_call_count(__func__);
144   return test::mock::btif_util::dump_rc_notification_event_id(event_id);
145 }
dump_rc_pdu(uint8_t pdu)146 const char* dump_rc_pdu(uint8_t pdu) {
147   inc_func_call_count(__func__);
148   return test::mock::btif_util::dump_rc_pdu(pdu);
149 }
dump_thread_evt(bt_cb_thread_evt evt)150 const char* dump_thread_evt(bt_cb_thread_evt evt) {
151   inc_func_call_count(__func__);
152   return test::mock::btif_util::dump_thread_evt(evt);
153 }
uint2devclass(uint32_t cod)154 DEV_CLASS uint2devclass(uint32_t cod) {
155   inc_func_call_count(__func__);
156   return test::mock::btif_util::uint2devclass(cod);
157 }
158 // Mocked functions complete
159 // END mockcify generation
160