• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 
23 #include <cstdint>
24 #include <functional>
25 #include <map>
26 #include <string>
27 
28 // Mock include file to share data between tests and mock
29 #include "test/mock/mock_btif_util.h"
30 
31 // Original usings
32 
33 // Mocked internal structures, if any
34 
35 namespace test {
36 namespace mock {
37 namespace btif_util {
38 
39 // Function state capture and return values, if needed
40 struct ascii_2_hex ascii_2_hex;
41 struct devclass2uint devclass2uint;
42 struct dump_adapter_scan_mode dump_adapter_scan_mode;
43 struct dump_av_audio_state dump_av_audio_state;
44 struct dump_av_conn_state dump_av_conn_state;
45 struct dump_bt_status dump_bt_status;
46 struct dump_dm_event dump_dm_event;
47 struct dump_dm_search_event dump_dm_search_event;
48 struct dump_hd_event dump_hd_event;
49 struct dump_hf_client_event dump_hf_client_event;
50 struct dump_hf_event dump_hf_event;
51 struct dump_hh_event dump_hh_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_hh_event::return_value = nullptr;
80 const char* dump_property_type::return_value = nullptr;
81 const char* dump_rc_event::return_value = nullptr;
82 const char* dump_rc_notification_event_id::return_value = nullptr;
83 const char* dump_rc_pdu::return_value = nullptr;
84 const char* dump_thread_evt::return_value = nullptr;
85 
86 }  // namespace btif_util
87 }  // namespace mock
88 }  // namespace test
89 
90 // Mocked functions, if any
ascii_2_hex(const char * p_ascii,int len,uint8_t * p_hex)91 int ascii_2_hex(const char* p_ascii, int len, uint8_t* p_hex) {
92   inc_func_call_count(__func__);
93   return test::mock::btif_util::ascii_2_hex(p_ascii, len, p_hex);
94 }
devclass2uint(DEV_CLASS dev_class)95 uint32_t devclass2uint(DEV_CLASS dev_class) {
96   inc_func_call_count(__func__);
97   return test::mock::btif_util::devclass2uint(dev_class);
98 }
dump_adapter_scan_mode(bt_scan_mode_t mode)99 const char* dump_adapter_scan_mode(bt_scan_mode_t mode) {
100   inc_func_call_count(__func__);
101   return test::mock::btif_util::dump_adapter_scan_mode(mode);
102 }
dump_av_audio_state(uint16_t event)103 const char* dump_av_audio_state(uint16_t event) {
104   inc_func_call_count(__func__);
105   return test::mock::btif_util::dump_av_audio_state(event);
106 }
dump_av_conn_state(uint16_t event)107 const char* dump_av_conn_state(uint16_t event) {
108   inc_func_call_count(__func__);
109   return test::mock::btif_util::dump_av_conn_state(event);
110 }
dump_bt_status(bt_status_t status)111 const char* dump_bt_status(bt_status_t status) {
112   inc_func_call_count(__func__);
113   return test::mock::btif_util::dump_bt_status(status);
114 }
dump_dm_event(uint16_t event)115 const char* dump_dm_event(uint16_t event) {
116   inc_func_call_count(__func__);
117   return test::mock::btif_util::dump_dm_event(event);
118 }
dump_dm_search_event(uint16_t event)119 const char* dump_dm_search_event(uint16_t event) {
120   inc_func_call_count(__func__);
121   return test::mock::btif_util::dump_dm_search_event(event);
122 }
dump_hd_event(uint16_t event)123 const char* dump_hd_event(uint16_t event) {
124   inc_func_call_count(__func__);
125   return test::mock::btif_util::dump_hd_event(event);
126 }
dump_hf_client_event(uint16_t event)127 const char* dump_hf_client_event(uint16_t event) {
128   inc_func_call_count(__func__);
129   return test::mock::btif_util::dump_hf_client_event(event);
130 }
dump_hf_event(uint16_t event)131 const char* dump_hf_event(uint16_t event) {
132   inc_func_call_count(__func__);
133   return test::mock::btif_util::dump_hf_event(event);
134 }
dump_hh_event(uint16_t event)135 const char* dump_hh_event(uint16_t event) {
136   inc_func_call_count(__func__);
137   return test::mock::btif_util::dump_hh_event(event);
138 }
dump_property_type(bt_property_type_t type)139 const char* dump_property_type(bt_property_type_t type) {
140   inc_func_call_count(__func__);
141   return test::mock::btif_util::dump_property_type(type);
142 }
dump_rc_event(uint8_t event)143 const char* dump_rc_event(uint8_t event) {
144   inc_func_call_count(__func__);
145   return test::mock::btif_util::dump_rc_event(event);
146 }
dump_rc_notification_event_id(uint8_t event_id)147 const char* dump_rc_notification_event_id(uint8_t event_id) {
148   inc_func_call_count(__func__);
149   return test::mock::btif_util::dump_rc_notification_event_id(event_id);
150 }
dump_rc_pdu(uint8_t pdu)151 const char* dump_rc_pdu(uint8_t pdu) {
152   inc_func_call_count(__func__);
153   return test::mock::btif_util::dump_rc_pdu(pdu);
154 }
dump_thread_evt(bt_cb_thread_evt evt)155 const char* dump_thread_evt(bt_cb_thread_evt evt) {
156   inc_func_call_count(__func__);
157   return test::mock::btif_util::dump_thread_evt(evt);
158 }
uint2devclass(uint32_t cod,DEV_CLASS dev_class)159 void uint2devclass(uint32_t cod, DEV_CLASS dev_class) {
160   inc_func_call_count(__func__);
161   test::mock::btif_util::uint2devclass(cod, dev_class);
162 }
163 // Mocked functions complete
164 // END mockcify generation
165