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 24 #include <base/functional/callback.h> 25 26 #include <functional> 27 28 // Original included files, if any 29 #include "stack/btm/security_device_record.h" 30 #include "types/ble_address_with_type.h" 31 #include "types/raw_address.h" 32 33 // Mocked compile conditionals, if any 34 namespace test { 35 namespace mock { 36 namespace stack_btm_ble_addr { 37 38 // Shared state between mocked functions and tests 39 // Name: btm_ble_init_pseudo_addr 40 // Params: tBTM_SEC_DEV_REC* p_dev_rec, const RawAddress& new_pseudo_addr 41 // Returns: bool 42 struct btm_ble_init_pseudo_addr { 43 std::function<bool(tBTM_SEC_DEV_REC* p_dev_rec, 44 const RawAddress& new_pseudo_addr)> 45 body{[](tBTM_SEC_DEV_REC* /* p_dev_rec */, 46 const RawAddress& /* new_pseudo_addr */) { return false; }}; operatorbtm_ble_init_pseudo_addr47 bool operator()(tBTM_SEC_DEV_REC* p_dev_rec, 48 const RawAddress& new_pseudo_addr) { 49 return body(p_dev_rec, new_pseudo_addr); 50 }; 51 }; 52 extern struct btm_ble_init_pseudo_addr btm_ble_init_pseudo_addr; 53 // Name: btm_ble_addr_resolvable 54 // Params: const RawAddress& rpa, tBTM_SEC_DEV_REC* p_dev_rec 55 // Returns: bool 56 struct btm_ble_addr_resolvable { 57 std::function<bool(const RawAddress& rpa, tBTM_SEC_DEV_REC* p_dev_rec)> body{ 58 [](const RawAddress& /* rpa */, tBTM_SEC_DEV_REC* /* p_dev_rec */) { 59 return false; 60 }}; operatorbtm_ble_addr_resolvable61 bool operator()(const RawAddress& rpa, tBTM_SEC_DEV_REC* p_dev_rec) { 62 return body(rpa, p_dev_rec); 63 }; 64 }; 65 extern struct btm_ble_addr_resolvable btm_ble_addr_resolvable; 66 // Name: btm_ble_resolve_random_addr 67 // Params: const RawAddress& random_bda 68 // Returns: tBTM_SEC_DEV_REC* 69 struct btm_ble_resolve_random_addr { 70 std::function<tBTM_SEC_DEV_REC*(const RawAddress& random_bda)> body{ 71 [](const RawAddress& /* random_bda */) { return nullptr; }}; operatorbtm_ble_resolve_random_addr72 tBTM_SEC_DEV_REC* operator()(const RawAddress& random_bda) { 73 return body(random_bda); 74 }; 75 }; 76 extern struct btm_ble_resolve_random_addr btm_ble_resolve_random_addr; 77 // Name: btm_identity_addr_to_random_pseudo 78 // Params: RawAddress* bd_addr, uint8_t* p_addr_type, bool refresh 79 // Returns: bool 80 struct btm_identity_addr_to_random_pseudo { 81 std::function<bool(RawAddress* bd_addr, tBLE_ADDR_TYPE* p_addr_type, 82 bool refresh)> 83 body{[](RawAddress* /* bd_addr */, tBLE_ADDR_TYPE* /* p_addr_type */, 84 bool /* refresh */) { return false; }}; operatorbtm_identity_addr_to_random_pseudo85 bool operator()(RawAddress* bd_addr, tBLE_ADDR_TYPE* p_addr_type, 86 bool refresh) { 87 return body(bd_addr, p_addr_type, refresh); 88 }; 89 }; 90 extern struct btm_identity_addr_to_random_pseudo 91 btm_identity_addr_to_random_pseudo; 92 // Name: btm_identity_addr_to_random_pseudo_from_address_with_type 93 // Params: tBLE_BD_ADDR* address_with_type, bool refresh 94 // Returns: bool 95 struct btm_identity_addr_to_random_pseudo_from_address_with_type { 96 std::function<bool(tBLE_BD_ADDR* address_with_type, bool refresh)> body{ 97 [](tBLE_BD_ADDR* /* address_with_type */, bool /* refresh */) { 98 return false; 99 }}; operatorbtm_identity_addr_to_random_pseudo_from_address_with_type100 bool operator()(tBLE_BD_ADDR* address_with_type, bool refresh) { 101 return body(address_with_type, refresh); 102 }; 103 }; 104 extern struct btm_identity_addr_to_random_pseudo_from_address_with_type 105 btm_identity_addr_to_random_pseudo_from_address_with_type; 106 // Name: btm_random_pseudo_to_identity_addr 107 // Params: RawAddress* random_pseudo, uint8_t* p_identity_addr_type 108 // Returns: bool 109 struct btm_random_pseudo_to_identity_addr { 110 std::function<bool(RawAddress* random_pseudo, 111 tBLE_ADDR_TYPE* p_identity_addr_type)> 112 body{[](RawAddress* /* random_pseudo */, 113 tBLE_ADDR_TYPE* /* p_identity_addr_type */) { return false; }}; operatorbtm_random_pseudo_to_identity_addr114 bool operator()(RawAddress* random_pseudo, 115 tBLE_ADDR_TYPE* p_identity_addr_type) { 116 return body(random_pseudo, p_identity_addr_type); 117 }; 118 }; 119 extern struct btm_random_pseudo_to_identity_addr 120 btm_random_pseudo_to_identity_addr; 121 // Name: btm_ble_refresh_peer_resolvable_private_addr 122 // Params: const RawAddress& pseudo_bda, const RawAddress& rpa, 123 // tBLE_RAND_ADDR_TYPE rra_type Returns: void 124 struct btm_ble_refresh_peer_resolvable_private_addr { 125 std::function<void(const RawAddress& pseudo_bda, const RawAddress& rpa, 126 tBLE_RAND_ADDR_TYPE rra_type)> 127 body{[](const RawAddress& /* pseudo_bda */, const RawAddress& /* rpa */, 128 tBLE_RAND_ADDR_TYPE /* rra_type */) {}}; operatorbtm_ble_refresh_peer_resolvable_private_addr129 void operator()(const RawAddress& pseudo_bda, const RawAddress& rpa, 130 tBLE_RAND_ADDR_TYPE rra_type) { 131 body(pseudo_bda, rpa, rra_type); 132 }; 133 }; 134 extern struct btm_ble_refresh_peer_resolvable_private_addr 135 btm_ble_refresh_peer_resolvable_private_addr; 136 137 } // namespace stack_btm_ble_addr 138 } // namespace mock 139 } // namespace test 140 141 // END mockcify generation 142