• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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:10
20  *
21  *  mockcify.pl ver 0.2
22  */
23 // Mock include file to share data between tests and mock
24 #include "test/mock/mock_stack_btm_ble_addr.h"
25 
26 // Original included files, if any
27 
28 #include "test/common/mock_functions.h"
29 #include "types/ble_address_with_type.h"
30 #include "types/raw_address.h"
31 
32 // Mocked compile conditionals, if any
33 // Mocked internal structures, if any
34 
35 namespace test {
36 namespace mock {
37 namespace stack_btm_ble_addr {
38 
39 // Function state capture and return values, if needed
40 struct btm_ble_init_pseudo_addr btm_ble_init_pseudo_addr;
41 struct btm_ble_addr_resolvable btm_ble_addr_resolvable;
42 struct btm_ble_resolve_random_addr btm_ble_resolve_random_addr;
43 struct btm_identity_addr_to_random_pseudo btm_identity_addr_to_random_pseudo;
44 struct btm_identity_addr_to_random_pseudo_from_address_with_type
45     btm_identity_addr_to_random_pseudo_from_address_with_type;
46 struct btm_random_pseudo_to_identity_addr btm_random_pseudo_to_identity_addr;
47 struct btm_ble_refresh_peer_resolvable_private_addr
48     btm_ble_refresh_peer_resolvable_private_addr;
49 
50 }  // namespace stack_btm_ble_addr
51 }  // namespace mock
52 }  // namespace test
53 
54 // Mocked functions, if any
btm_ble_init_pseudo_addr(tBTM_SEC_DEV_REC * p_dev_rec,const RawAddress & new_pseudo_addr)55 bool btm_ble_init_pseudo_addr(tBTM_SEC_DEV_REC* p_dev_rec,
56                               const RawAddress& new_pseudo_addr) {
57   inc_func_call_count(__func__);
58   return test::mock::stack_btm_ble_addr::btm_ble_init_pseudo_addr(
59       p_dev_rec, new_pseudo_addr);
60 }
btm_ble_addr_resolvable(const RawAddress & rpa,tBTM_SEC_DEV_REC * p_dev_rec)61 bool btm_ble_addr_resolvable(const RawAddress& rpa,
62                              tBTM_SEC_DEV_REC* p_dev_rec) {
63   inc_func_call_count(__func__);
64   return test::mock::stack_btm_ble_addr::btm_ble_addr_resolvable(rpa,
65                                                                  p_dev_rec);
66 }
btm_ble_resolve_random_addr(const RawAddress & random_bda)67 tBTM_SEC_DEV_REC* btm_ble_resolve_random_addr(const RawAddress& random_bda) {
68   inc_func_call_count(__func__);
69   return test::mock::stack_btm_ble_addr::btm_ble_resolve_random_addr(
70       random_bda);
71 }
btm_identity_addr_to_random_pseudo(RawAddress * bd_addr,tBLE_ADDR_TYPE * p_addr_type,bool refresh)72 bool btm_identity_addr_to_random_pseudo(RawAddress* bd_addr,
73                                         tBLE_ADDR_TYPE* p_addr_type,
74                                         bool refresh) {
75   inc_func_call_count(__func__);
76   return test::mock::stack_btm_ble_addr::btm_identity_addr_to_random_pseudo(
77       bd_addr, p_addr_type, refresh);
78 }
btm_identity_addr_to_random_pseudo_from_address_with_type(tBLE_BD_ADDR * address_with_type,bool refresh)79 bool btm_identity_addr_to_random_pseudo_from_address_with_type(
80     tBLE_BD_ADDR* address_with_type, bool refresh) {
81   inc_func_call_count(__func__);
82   return test::mock::stack_btm_ble_addr::
83       btm_identity_addr_to_random_pseudo_from_address_with_type(
84           address_with_type, refresh);
85 }
btm_random_pseudo_to_identity_addr(RawAddress * random_pseudo,tBLE_ADDR_TYPE * p_identity_addr_type)86 bool btm_random_pseudo_to_identity_addr(RawAddress* random_pseudo,
87                                         tBLE_ADDR_TYPE* p_identity_addr_type) {
88   inc_func_call_count(__func__);
89   return test::mock::stack_btm_ble_addr::btm_random_pseudo_to_identity_addr(
90       random_pseudo, p_identity_addr_type);
91 }
btm_ble_refresh_peer_resolvable_private_addr(const RawAddress & pseudo_bda,const RawAddress & rpa,tBLE_RAND_ADDR_TYPE rra_type)92 void btm_ble_refresh_peer_resolvable_private_addr(
93     const RawAddress& pseudo_bda, const RawAddress& rpa,
94     tBLE_RAND_ADDR_TYPE rra_type) {
95   inc_func_call_count(__func__);
96   test::mock::stack_btm_ble_addr::btm_ble_refresh_peer_resolvable_private_addr(
97       pseudo_bda, rpa, rra_type);
98 }
99 
100 // END mockcify generation
101