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 #pragma once
17 
18 /*
19  * Generated mock file from original source file
20  *   Functions generated:18
21  *
22  *  mockcify.pl ver 0.6.0
23  */
24 #include <cstdint>
25 #include <functional>
26 
27 // Original included files, if any
28 #include <cstdint>
29 #include <functional>
30 
31 #include "include/hardware/bluetooth.h"
32 #include "stack/include/bt_dev_class.h"
33 
34 // Original usings
35 
36 // Mocked compile conditionals, if any
37 
38 namespace test {
39 namespace mock {
40 namespace btif_util {
41 
42 // Shared state between mocked functions and tests
43 // Name: ascii_2_hex
44 // Params: const char* p_ascii, int len, uint8_t* p_hex
45 // Return: int
46 struct ascii_2_hex {
47   static int return_value;
48   std::function<int(const char* p_ascii, int len, uint8_t* p_hex)> body{
49       [](const char* /* p_ascii */, int /* len */, uint8_t* /* p_hex */) {
50         return return_value;
51       }};
operatorascii_2_hex52   int operator()(const char* p_ascii, int len, uint8_t* p_hex) {
53     return body(p_ascii, len, p_hex);
54   };
55 };
56 extern struct ascii_2_hex ascii_2_hex;
57 
58 // Name: devclass2uint
59 // Params: DEV_CLASS dev_class
60 // Return: uint32_t
61 struct devclass2uint {
62   static uint32_t return_value;
63   std::function<uint32_t(DEV_CLASS dev_class)> body{
64       [](DEV_CLASS /* dev_class */) { return return_value; }};
operatordevclass2uint65   uint32_t operator()(DEV_CLASS dev_class) { return body(dev_class); };
66 };
67 extern struct devclass2uint devclass2uint;
68 
69 // Name: dump_adapter_scan_mode
70 // Params: bt_scan_mode_t mode
71 // Return: const char*
72 struct dump_adapter_scan_mode {
73   static const char* return_value;
74   std::function<const char*(bt_scan_mode_t mode)> body{
75       [](bt_scan_mode_t /* mode */) { return return_value; }};
operatordump_adapter_scan_mode76   const char* operator()(bt_scan_mode_t mode) { return body(mode); };
77 };
78 extern struct dump_adapter_scan_mode dump_adapter_scan_mode;
79 
80 // Name: dump_av_audio_state
81 // Params: uint16_t event
82 // Return: const char*
83 struct dump_av_audio_state {
84   static const char* return_value;
85   std::function<const char*(uint16_t event)> body{
86       [](uint16_t /* event */) { return return_value; }};
operatordump_av_audio_state87   const char* operator()(uint16_t event) { return body(event); };
88 };
89 extern struct dump_av_audio_state dump_av_audio_state;
90 
91 // Name: dump_av_conn_state
92 // Params: uint16_t event
93 // Return: const char*
94 struct dump_av_conn_state {
95   static const char* return_value;
96   std::function<const char*(uint16_t event)> body{
97       [](uint16_t /* event */) { return return_value; }};
operatordump_av_conn_state98   const char* operator()(uint16_t event) { return body(event); };
99 };
100 extern struct dump_av_conn_state dump_av_conn_state;
101 
102 // Name: dump_bt_status
103 // Params: bt_status_t status
104 // Return: const char*
105 struct dump_bt_status {
106   static const char* return_value;
107   std::function<const char*(bt_status_t status)> body{
108       [](bt_status_t /* status */) { return return_value; }};
operatordump_bt_status109   const char* operator()(bt_status_t status) { return body(status); };
110 };
111 extern struct dump_bt_status dump_bt_status;
112 
113 // Name: dump_dm_event
114 // Params: uint16_t event
115 // Return: const char*
116 struct dump_dm_event {
117   static const char* return_value;
118   std::function<const char*(uint16_t event)> body{
119       [](uint16_t /* event */) { return return_value; }};
operatordump_dm_event120   const char* operator()(uint16_t event) { return body(event); };
121 };
122 extern struct dump_dm_event dump_dm_event;
123 
124 // Name: dump_dm_search_event
125 // Params: uint16_t event
126 // Return: const char*
127 struct dump_dm_search_event {
128   static const char* return_value;
129   std::function<const char*(uint16_t event)> body{
130       [](uint16_t /* event */) { return return_value; }};
operatordump_dm_search_event131   const char* operator()(uint16_t event) { return body(event); };
132 };
133 extern struct dump_dm_search_event dump_dm_search_event;
134 
135 // Name: dump_hd_event
136 // Params: uint16_t event
137 // Return: const char*
138 struct dump_hd_event {
139   static const char* return_value;
140   std::function<const char*(uint16_t event)> body{
141       [](uint16_t /* event */) { return return_value; }};
operatordump_hd_event142   const char* operator()(uint16_t event) { return body(event); };
143 };
144 extern struct dump_hd_event dump_hd_event;
145 
146 // Name: dump_hf_client_event
147 // Params: uint16_t event
148 // Return: const char*
149 struct dump_hf_client_event {
150   static const char* return_value;
151   std::function<const char*(uint16_t event)> body{
152       [](uint16_t /* event */) { return return_value; }};
operatordump_hf_client_event153   const char* operator()(uint16_t event) { return body(event); };
154 };
155 extern struct dump_hf_client_event dump_hf_client_event;
156 
157 // Name: dump_hf_event
158 // Params: uint16_t event
159 // Return: const char*
160 struct dump_hf_event {
161   static const char* return_value;
162   std::function<const char*(uint16_t event)> body{
163       [](uint16_t /* event */) { return return_value; }};
operatordump_hf_event164   const char* operator()(uint16_t event) { return body(event); };
165 };
166 
167 // Name: dump_property_type
168 // Params: bt_property_type_t type
169 // Return: const char*
170 struct dump_property_type {
171   static const char* return_value;
172   std::function<const char*(bt_property_type_t type)> body{
173       [](bt_property_type_t /* type */) { return return_value; }};
operatordump_property_type174   const char* operator()(bt_property_type_t type) { return body(type); };
175 };
176 extern struct dump_property_type dump_property_type;
177 
178 // Name: dump_rc_event
179 // Params: uint8_t event
180 // Return: const char*
181 struct dump_rc_event {
182   static const char* return_value;
183   std::function<const char*(uint8_t event)> body{
184       [](uint8_t /* event */) { return return_value; }};
operatordump_rc_event185   const char* operator()(uint8_t event) { return body(event); };
186 };
187 extern struct dump_rc_event dump_rc_event;
188 
189 // Name: dump_rc_notification_event_id
190 // Params: uint8_t event_id
191 // Return: const char*
192 struct dump_rc_notification_event_id {
193   static const char* return_value;
194   std::function<const char*(uint8_t event_id)> body{
195       [](uint8_t /* event_id */) { return return_value; }};
operatordump_rc_notification_event_id196   const char* operator()(uint8_t event_id) { return body(event_id); };
197 };
198 extern struct dump_rc_notification_event_id dump_rc_notification_event_id;
199 
200 // Name: dump_rc_pdu
201 // Params: uint8_t pdu
202 // Return: const char*
203 struct dump_rc_pdu {
204   static const char* return_value;
205   std::function<const char*(uint8_t pdu)> body{
206       [](uint8_t /* pdu */) { return return_value; }};
operatordump_rc_pdu207   const char* operator()(uint8_t pdu) { return body(pdu); };
208 };
209 extern struct dump_rc_pdu dump_rc_pdu;
210 
211 // Name: dump_thread_evt
212 // Params: bt_cb_thread_evt evt
213 // Return: const char*
214 struct dump_thread_evt {
215   static const char* return_value;
216   std::function<const char*(bt_cb_thread_evt evt)> body{
217       [](bt_cb_thread_evt /* evt */) { return return_value; }};
operatordump_thread_evt218   const char* operator()(bt_cb_thread_evt evt) { return body(evt); };
219 };
220 extern struct dump_thread_evt dump_thread_evt;
221 
222 // Name: uint2devclass
223 // Params: uint32_t cod, DEV_CLASS dev_class
224 // Return: void
225 struct uint2devclass {
226   static constexpr DEV_CLASS return_value{};
227   std::function<DEV_CLASS(uint32_t cod)> body{
228       [](uint32_t /* cod */) { return return_value; }};
operatoruint2devclass229   DEV_CLASS operator()(uint32_t cod) { return body(cod); };
230 };
231 extern struct uint2devclass uint2devclass;
232 
233 }  // namespace btif_util
234 }  // namespace mock
235 }  // namespace test
236 
237 // END mockcify generation
238