1 /*
2 * Copyright 2021 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:6
20 *
21 * mockcify.pl ver 0.2
22 */
23
24 #include <cstdint>
25 #include <map>
26 #include <string>
27
28 extern std::map<std::string, int> mock_function_count_map;
29
30 // Original included files, if any
31 // NOTE: Since this is a mock file with mock definitions some number of
32 // include files may not be required. The include-what-you-use
33 // still applies, but crafting proper inclusion is out of scope
34 // for this effort. This compilation unit may compile as-is, or
35 // may need attention to prune the inclusion set.
36
37 // Mock include file to share data between tests and mock
38 #include "test/mock/mock_stack_acl_btm_ble_connection_establishment.h"
39
40 // Mocked compile conditionals, if any
41 #ifndef UNUSED_ATTR
42 #define UNUSED_ATTR
43 #endif
44
45 // Mocked internal structures, if any
46
47 namespace test {
48 namespace mock {
49 namespace stack_acl_btm_ble_connection_establishment {
50
51 // Function state capture and return values, if needed
52 struct btm_send_hci_create_connection btm_send_hci_create_connection;
53 struct btm_ble_create_ll_conn_complete btm_ble_create_ll_conn_complete;
54 struct maybe_resolve_address maybe_resolve_address;
55 struct btm_ble_conn_complete btm_ble_conn_complete;
56 struct btm_ble_create_conn_cancel btm_ble_create_conn_cancel;
57 struct btm_ble_create_conn_cancel_complete btm_ble_create_conn_cancel_complete;
58
59 } // namespace stack_acl_btm_ble_connection_establishment
60 } // namespace mock
61 } // namespace test
62
63 // Mocked functions, if any
btm_send_hci_create_connection(uint16_t scan_int,uint16_t scan_win,uint8_t init_filter_policy,uint8_t addr_type_peer,const RawAddress & bda_peer,uint8_t addr_type_own,uint16_t conn_int_min,uint16_t conn_int_max,uint16_t conn_latency,uint16_t conn_timeout,uint16_t min_ce_len,uint16_t max_ce_len,uint8_t initiating_phys)64 void btm_send_hci_create_connection(
65 uint16_t scan_int, uint16_t scan_win, uint8_t init_filter_policy,
66 uint8_t addr_type_peer, const RawAddress& bda_peer, uint8_t addr_type_own,
67 uint16_t conn_int_min, uint16_t conn_int_max, uint16_t conn_latency,
68 uint16_t conn_timeout, uint16_t min_ce_len, uint16_t max_ce_len,
69 uint8_t initiating_phys) {
70 mock_function_count_map[__func__]++;
71 test::mock::stack_acl_btm_ble_connection_establishment::
72 btm_send_hci_create_connection(
73 scan_int, scan_win, init_filter_policy, addr_type_peer, bda_peer,
74 addr_type_own, conn_int_min, conn_int_max, conn_latency, conn_timeout,
75 min_ce_len, max_ce_len, initiating_phys);
76 }
btm_ble_create_ll_conn_complete(tHCI_STATUS status)77 void btm_ble_create_ll_conn_complete(tHCI_STATUS status) {
78 mock_function_count_map[__func__]++;
79 test::mock::stack_acl_btm_ble_connection_establishment::
80 btm_ble_create_ll_conn_complete(status);
81 }
maybe_resolve_address(RawAddress * bda,tBLE_ADDR_TYPE * bda_type)82 bool maybe_resolve_address(RawAddress* bda, tBLE_ADDR_TYPE* bda_type) {
83 mock_function_count_map[__func__]++;
84 return test::mock::stack_acl_btm_ble_connection_establishment::
85 maybe_resolve_address(bda, bda_type);
86 }
btm_ble_conn_complete(uint8_t * p,uint16_t evt_len,bool enhanced)87 void btm_ble_conn_complete(uint8_t* p, uint16_t evt_len, bool enhanced) {
88 mock_function_count_map[__func__]++;
89 test::mock::stack_acl_btm_ble_connection_establishment::btm_ble_conn_complete(
90 p, evt_len, enhanced);
91 }
btm_ble_create_conn_cancel()92 void btm_ble_create_conn_cancel() {
93 mock_function_count_map[__func__]++;
94 test::mock::stack_acl_btm_ble_connection_establishment::
95 btm_ble_create_conn_cancel();
96 }
btm_ble_create_conn_cancel_complete(uint8_t * p)97 void btm_ble_create_conn_cancel_complete(uint8_t* p) {
98 mock_function_count_map[__func__]++;
99 test::mock::stack_acl_btm_ble_connection_establishment::
100 btm_ble_create_conn_cancel_complete(p);
101 }
102
103 // END mockcify generation
104