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:11
20  */
21 
22 #include <map>
23 #include <string>
24 
25 extern std::map<std::string, int> mock_function_count_map;
26 
27 #include <string.h>
28 #include "bt_target.h"
29 #include "hcimsgs.h"
30 #include "main/shim/shim.h"
31 #include "stack/btm/btm_dev.h"
32 #include "stack/include/l2c_api.h"
33 #include "stack/include/l2cdefs.h"
34 #include "stack/include/smp_api.h"
35 #include "stack/smp/smp_int.h"
36 #include "stack_config.h"
37 #include "utils/include/bt_utils.h"
38 
39 #ifndef UNUSED_ATTR
40 #define UNUSED_ATTR
41 #endif
42 
SMP_PairCancel(const RawAddress & bd_addr)43 bool SMP_PairCancel(const RawAddress& bd_addr) {
44   mock_function_count_map[__func__]++;
45   return false;
46 }
SMP_Register(tSMP_CALLBACK * p_cback)47 bool SMP_Register(tSMP_CALLBACK* p_cback) {
48   mock_function_count_map[__func__]++;
49   return false;
50 }
SMP_BR_PairWith(const RawAddress & bd_addr)51 tSMP_STATUS SMP_BR_PairWith(const RawAddress& bd_addr) {
52   mock_function_count_map[__func__]++;
53   return SMP_SUCCESS;
54 }
SMP_Pair(const RawAddress & bd_addr)55 tSMP_STATUS SMP_Pair(const RawAddress& bd_addr) {
56   mock_function_count_map[__func__]++;
57   return SMP_SUCCESS;
58 }
SMP_SetTraceLevel(uint8_t new_level)59 uint8_t SMP_SetTraceLevel(uint8_t new_level) {
60   mock_function_count_map[__func__]++;
61   return 0;
62 }
SMP_ConfirmReply(const RawAddress & bd_addr,uint8_t res)63 void SMP_ConfirmReply(const RawAddress& bd_addr, uint8_t res) {
64   mock_function_count_map[__func__]++;
65 }
SMP_Init(void)66 void SMP_Init(void) { mock_function_count_map[__func__]++; }
SMP_OobDataReply(const RawAddress & bd_addr,tSMP_STATUS res,uint8_t len,uint8_t * p_data)67 void SMP_OobDataReply(const RawAddress& bd_addr, tSMP_STATUS res, uint8_t len,
68                       uint8_t* p_data) {
69   mock_function_count_map[__func__]++;
70 }
SMP_PasskeyReply(const RawAddress & bd_addr,uint8_t res,uint32_t passkey)71 void SMP_PasskeyReply(const RawAddress& bd_addr, uint8_t res,
72                       uint32_t passkey) {
73   mock_function_count_map[__func__]++;
74 }
SMP_SecureConnectionOobDataReply(uint8_t * p_data)75 void SMP_SecureConnectionOobDataReply(uint8_t* p_data) {
76   mock_function_count_map[__func__]++;
77 }
SMP_SecurityGrant(const RawAddress & bd_addr,tSMP_STATUS res)78 void SMP_SecurityGrant(const RawAddress& bd_addr, tSMP_STATUS res) {
79   mock_function_count_map[__func__]++;
80 }
81 
SMP_CrLocScOobData(base::OnceCallback<void (tBT_TRANSPORT,bool,const std::array<unsigned char,16> &,const std::array<unsigned char,16> &)> callback)82 void SMP_CrLocScOobData(
83     base::OnceCallback<void(tBT_TRANSPORT, bool,
84                             const std::array<unsigned char, 16>&,
85                             const std::array<unsigned char, 16>&)>
86         callback) {
87   mock_function_count_map[__func__]++;
88 }
89