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:5
20 */
21
22 #include <cstddef>
23 #include <cstdint>
24 #include <map>
25 #include <string>
26
27 #include "main/shim/acl_api.h"
28 #include "stack/include/bt_hdr.h"
29 #include "stack/include/bt_octets.h"
30 #include "test/common/mock_functions.h"
31 #include "types/ble_address_with_type.h"
32 #include "types/raw_address.h"
33
34 #ifndef UNUSED_ATTR
35 #define UNUSED_ATTR
36 #endif
37
ACL_CreateClassicConnection(const RawAddress & raw_address)38 void bluetooth::shim::ACL_CreateClassicConnection(
39 const RawAddress& raw_address) {
40 inc_func_call_count(__func__);
41 }
ACL_CancelClassicConnection(const RawAddress & raw_address)42 void bluetooth::shim::ACL_CancelClassicConnection(
43 const RawAddress& raw_address) {
44 inc_func_call_count(__func__);
45 }
ACL_AcceptLeConnectionFrom(const tBLE_BD_ADDR & legacy_address_with_type,bool is_direct)46 bool bluetooth::shim::ACL_AcceptLeConnectionFrom(
47 const tBLE_BD_ADDR& legacy_address_with_type, bool is_direct) {
48 inc_func_call_count(__func__);
49 return true;
50 }
ACL_IgnoreLeConnectionFrom(const tBLE_BD_ADDR & legacy_address_with_type)51 void bluetooth::shim::ACL_IgnoreLeConnectionFrom(
52 const tBLE_BD_ADDR& legacy_address_with_type) {
53 inc_func_call_count(__func__);
54 }
ACL_ConfigureLePrivacy(bool is_le_privacy_enabled)55 void bluetooth::shim::ACL_ConfigureLePrivacy(bool is_le_privacy_enabled) {
56 inc_func_call_count(__func__);
57 }
ACL_WriteData(uint16_t handle,BT_HDR * p_buf)58 void bluetooth::shim::ACL_WriteData(uint16_t handle, BT_HDR* p_buf) {
59 inc_func_call_count(__func__);
60 }
ACL_Disconnect(uint16_t handle,bool is_classic,tHCI_STATUS reason,std::string comment)61 void bluetooth::shim::ACL_Disconnect(uint16_t handle, bool is_classic,
62 tHCI_STATUS reason, std::string comment) {
63 inc_func_call_count(__func__);
64 }
ACL_IgnoreAllLeConnections()65 void bluetooth::shim::ACL_IgnoreAllLeConnections() {
66 inc_func_call_count(__func__);
67 }
ACL_ReadConnectionAddress(const RawAddress & pseudo_addr,RawAddress & conn_addr,tBLE_ADDR_TYPE * p_addr_type)68 void bluetooth::shim::ACL_ReadConnectionAddress(const RawAddress& pseudo_addr,
69 RawAddress& conn_addr,
70 tBLE_ADDR_TYPE* p_addr_type) {
71 inc_func_call_count(__func__);
72 }
ACL_GetAdvertisingSetConnectedTo(const RawAddress & addr)73 std::optional<uint8_t> bluetooth::shim::ACL_GetAdvertisingSetConnectedTo(
74 const RawAddress& addr) {
75 inc_func_call_count(__func__);
76 return std::nullopt;
77 }
ACL_AddToAddressResolution(const tBLE_BD_ADDR & legacy_address_with_type,const Octet16 & peer_irk,const Octet16 & local_irk)78 void bluetooth::shim::ACL_AddToAddressResolution(
79 const tBLE_BD_ADDR& legacy_address_with_type, const Octet16& peer_irk,
80 const Octet16& local_irk) {
81 inc_func_call_count(__func__);
82 }
83
ACL_RemoveFromAddressResolution(const tBLE_BD_ADDR & legacy_address_with_type)84 void bluetooth::shim::ACL_RemoveFromAddressResolution(
85 const tBLE_BD_ADDR& legacy_address_with_type) {
86 inc_func_call_count(__func__);
87 }
ACL_ClearAddressResolution()88 void bluetooth::shim::ACL_ClearAddressResolution() {
89 inc_func_call_count(__func__);
90 }
ACL_LeSetDefaultSubrate(uint16_t subrate_min,uint16_t subrate_max,uint16_t max_latency,uint16_t cont_num,uint16_t sup_tout)91 void bluetooth::shim::ACL_LeSetDefaultSubrate(uint16_t subrate_min,
92 uint16_t subrate_max,
93 uint16_t max_latency,
94 uint16_t cont_num,
95 uint16_t sup_tout) {
96 inc_func_call_count(__func__);
97 }
ACL_LeSubrateRequest(uint16_t hci_handle,uint16_t subrate_min,uint16_t subrate_max,uint16_t max_latency,uint16_t cont_num,uint16_t sup_tout)98 void bluetooth::shim::ACL_LeSubrateRequest(
99 uint16_t hci_handle, uint16_t subrate_min, uint16_t subrate_max,
100 uint16_t max_latency, uint16_t cont_num, uint16_t sup_tout) {
101 inc_func_call_count(__func__);
102 }
103