• 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 "stack/btm/btm_ble_int.h"
29 #include "stack/include/btm_ble_addr.h"
30 #include "stack/include/btm_ble_privacy.h"
31 #include "test/common/mock_functions.h"
32 #include "types/ble_address_with_type.h"
33 #include "types/raw_address.h"
34 
35 // Mocked compile conditionals, if any
36 // Mocked internal structures, if any
37 
38 namespace test {
39 namespace mock {
40 namespace stack_btm_ble_addr {
41 
42 // Function state capture and return values, if needed
43 struct btm_ble_addr_resolvable btm_ble_addr_resolvable;
44 struct btm_ble_resolve_random_addr btm_ble_resolve_random_addr;
45 struct btm_identity_addr_to_random_pseudo btm_identity_addr_to_random_pseudo;
46 struct btm_identity_addr_to_random_pseudo_from_address_with_type
47         btm_identity_addr_to_random_pseudo_from_address_with_type;
48 struct btm_random_pseudo_to_identity_addr btm_random_pseudo_to_identity_addr;
49 struct btm_ble_refresh_peer_resolvable_private_addr btm_ble_refresh_peer_resolvable_private_addr;
50 
51 }  // namespace stack_btm_ble_addr
52 }  // namespace mock
53 }  // namespace test
54 
55 // Mocked functions, if any
btm_ble_addr_resolvable(const RawAddress & rpa,tBTM_SEC_DEV_REC * p_dev_rec)56 bool btm_ble_addr_resolvable(const RawAddress& rpa, tBTM_SEC_DEV_REC* p_dev_rec) {
57   inc_func_call_count(__func__);
58   return test::mock::stack_btm_ble_addr::btm_ble_addr_resolvable(rpa, p_dev_rec);
59 }
btm_ble_resolve_random_addr(const RawAddress & random_bda)60 tBTM_SEC_DEV_REC* btm_ble_resolve_random_addr(const RawAddress& random_bda) {
61   inc_func_call_count(__func__);
62   return test::mock::stack_btm_ble_addr::btm_ble_resolve_random_addr(random_bda);
63 }
btm_identity_addr_to_random_pseudo(RawAddress * bd_addr,tBLE_ADDR_TYPE * p_addr_type,bool refresh)64 bool btm_identity_addr_to_random_pseudo(RawAddress* bd_addr, tBLE_ADDR_TYPE* p_addr_type,
65                                         bool refresh) {
66   inc_func_call_count(__func__);
67   return test::mock::stack_btm_ble_addr::btm_identity_addr_to_random_pseudo(bd_addr, p_addr_type,
68                                                                             refresh);
69 }
btm_identity_addr_to_random_pseudo_from_address_with_type(tBLE_BD_ADDR * address_with_type,bool refresh)70 bool btm_identity_addr_to_random_pseudo_from_address_with_type(tBLE_BD_ADDR* address_with_type,
71                                                                bool refresh) {
72   inc_func_call_count(__func__);
73   return test::mock::stack_btm_ble_addr::btm_identity_addr_to_random_pseudo_from_address_with_type(
74           address_with_type, refresh);
75 }
btm_random_pseudo_to_identity_addr(RawAddress * random_pseudo,tBLE_ADDR_TYPE * p_identity_addr_type)76 bool btm_random_pseudo_to_identity_addr(RawAddress* random_pseudo,
77                                         tBLE_ADDR_TYPE* p_identity_addr_type) {
78   inc_func_call_count(__func__);
79   return test::mock::stack_btm_ble_addr::btm_random_pseudo_to_identity_addr(random_pseudo,
80                                                                             p_identity_addr_type);
81 }
btm_ble_refresh_peer_resolvable_private_addr(const RawAddress & pseudo_bda,const RawAddress & rpa,tBLE_RAND_ADDR_TYPE rra_type)82 void btm_ble_refresh_peer_resolvable_private_addr(const RawAddress& pseudo_bda,
83                                                   const RawAddress& rpa,
84                                                   tBLE_RAND_ADDR_TYPE rra_type) {
85   inc_func_call_count(__func__);
86   test::mock::stack_btm_ble_addr::btm_ble_refresh_peer_resolvable_private_addr(pseudo_bda, rpa,
87                                                                                rra_type);
88 }
89 
90 // END mockcify generation
91