1 /*
2  * Copyright 2020 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:9
20  */
21 
22 #include <map>
23 #include <string>
24 
25 extern std::map<std::string, int> mock_function_count_map;
26 
27 #define LOG_TAG "bt_btu_hcif"
28 #include <base/bind.h>
29 #include <base/location.h>
30 #include <cstdint>
31 #include "btif/include/btif_config.h"
32 #include "common/metrics.h"
33 #include "device/include/controller.h"
34 #include "osi/include/log.h"
35 #include "stack/include/acl_hci_link_interface.h"
36 #include "stack/include/ble_acl_interface.h"
37 #include "stack/include/ble_hci_link_interface.h"
38 #include "stack/include/btm_iso_api.h"
39 #include "stack/include/btu.h"
40 #include "stack/include/dev_hci_link_interface.h"
41 #include "stack/include/gatt_api.h"
42 #include "stack/include/hci_evt_length.h"
43 #include "stack/include/hcidefs.h"
44 #include "stack/include/inq_hci_link_interface.h"
45 #include "stack/include/l2cap_hci_link_interface.h"
46 #include "stack/include/sco_hci_link_interface.h"
47 #include "stack/include/sec_hci_link_interface.h"
48 
49 #ifndef UNUSED_ATTR
50 #define UNUSED_ATTR
51 #endif
52 
53 using hci_cmd_cb = base::OnceCallback<void(
54     uint8_t* /* return_parameters */, uint16_t /* return_parameters_length*/)>;
55 
56 struct cmd_with_cb_data {
57   hci_cmd_cb cb;
58   base::Location posted_from;
59 };
60 
btu_hcif_log_event_metrics(uint8_t evt_code,uint8_t * p_event)61 void btu_hcif_log_event_metrics(uint8_t evt_code, uint8_t* p_event) {
62   mock_function_count_map[__func__]++;
63 }
btu_hcif_process_event(UNUSED_ATTR uint8_t controller_id,BT_HDR * p_msg)64 void btu_hcif_process_event(UNUSED_ATTR uint8_t controller_id, BT_HDR* p_msg) {
65   mock_function_count_map[__func__]++;
66 }
btu_hcif_send_cmd(UNUSED_ATTR uint8_t controller_id,BT_HDR * p_buf)67 void btu_hcif_send_cmd(UNUSED_ATTR uint8_t controller_id, BT_HDR* p_buf) {
68   mock_function_count_map[__func__]++;
69 }
btu_hcif_send_cmd_with_cb(const base::Location & posted_from,uint16_t opcode,uint8_t * params,uint8_t params_len,hci_cmd_cb cb)70 void btu_hcif_send_cmd_with_cb(const base::Location& posted_from,
71                                uint16_t opcode, uint8_t* params,
72                                uint8_t params_len, hci_cmd_cb cb) {
73   mock_function_count_map[__func__]++;
74 }
cmd_with_cb_data_cleanup(cmd_with_cb_data * cb_wrapper)75 void cmd_with_cb_data_cleanup(cmd_with_cb_data* cb_wrapper) {
76   mock_function_count_map[__func__]++;
77 }
cmd_with_cb_data_init(cmd_with_cb_data * cb_wrapper)78 void cmd_with_cb_data_init(cmd_with_cb_data* cb_wrapper) {
79   mock_function_count_map[__func__]++;
80 }
81