• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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:44
20  */
21 
22 #include <stddef.h>
23 #include <stdio.h>
24 #include <stdlib.h>
25 #include <string.h>
26 
27 #include <map>
28 #include <string>
29 
30 #include "advertise_data_parser.h"
31 #include "btm_api.h"
32 #include "common/time_util.h"
33 #include "device/include/controller.h"
34 #include "main/shim/btm_api.h"
35 #include "main/shim/shim.h"
36 #include "osi/include/log.h"
37 #include "osi/include/osi.h"
38 #include "stack/btm/btm_ble_int.h"
39 #include "stack/btm/btm_int_types.h"
40 #include "stack/include/acl_api.h"
41 #include "stack/include/bt_hdr.h"
42 #include "stack/include/btm_ble_api.h"
43 #include "stack/include/inq_hci_link_interface.h"
44 #include "test/common/mock_functions.h"
45 #include "types/bluetooth/uuid.h"
46 #include "types/raw_address.h"
47 
48 #ifndef UNUSED_ATTR
49 #define UNUSED_ATTR
50 #endif
51 
SendRemoteNameRequest(const RawAddress & raw_address)52 void SendRemoteNameRequest(const RawAddress& raw_address) {
53   inc_func_call_count(__func__);
54 }
BTM_HasEirService(const uint32_t * p_eir_uuid,uint16_t uuid16)55 bool BTM_HasEirService(const uint32_t* p_eir_uuid, uint16_t uuid16) {
56   inc_func_call_count(__func__);
57   return false;
58 }
btm_inq_find_bdaddr(const RawAddress & p_bda)59 bool btm_inq_find_bdaddr(const RawAddress& p_bda) {
60   inc_func_call_count(__func__);
61   return false;
62 }
BTM_HasInquiryEirService(tBTM_INQ_RESULTS * p_results,uint16_t uuid16)63 tBTM_EIR_SEARCH_RESULT BTM_HasInquiryEirService(tBTM_INQ_RESULTS* p_results,
64                                                 uint16_t uuid16) {
65   inc_func_call_count(__func__);
66   return 0;
67 }
BTM_InqDbFirst(void)68 tBTM_INQ_INFO* BTM_InqDbFirst(void) {
69   inc_func_call_count(__func__);
70   return nullptr;
71 }
BTM_InqDbNext(tBTM_INQ_INFO * p_cur)72 tBTM_INQ_INFO* BTM_InqDbNext(tBTM_INQ_INFO* p_cur) {
73   inc_func_call_count(__func__);
74   return nullptr;
75 }
BTM_InqDbRead(const RawAddress & p_bda)76 tBTM_INQ_INFO* BTM_InqDbRead(const RawAddress& p_bda) {
77   inc_func_call_count(__func__);
78   return nullptr;
79 }
BTM_CancelRemoteDeviceName(void)80 tBTM_STATUS BTM_CancelRemoteDeviceName(void) {
81   inc_func_call_count(__func__);
82   return BTM_SUCCESS;
83 }
BTM_ClearInqDb(const RawAddress * p_bda)84 tBTM_STATUS BTM_ClearInqDb(const RawAddress* p_bda) {
85   inc_func_call_count(__func__);
86   return BTM_SUCCESS;
87 }
BTM_ReadRemoteDeviceName(const RawAddress & remote_bda,tBTM_NAME_CMPL_CB * p_cb,tBT_TRANSPORT transport)88 tBTM_STATUS BTM_ReadRemoteDeviceName(const RawAddress& remote_bda,
89                                      tBTM_NAME_CMPL_CB* p_cb,
90                                      tBT_TRANSPORT transport) {
91   inc_func_call_count(__func__);
92   return BTM_SUCCESS;
93 }
BTM_SetConnectability(uint16_t page_mode)94 tBTM_STATUS BTM_SetConnectability(uint16_t page_mode) {
95   inc_func_call_count(__func__);
96   return BTM_SUCCESS;
97 }
BTM_SetDiscoverability(uint16_t inq_mode)98 tBTM_STATUS BTM_SetDiscoverability(uint16_t inq_mode) {
99   inc_func_call_count(__func__);
100   return BTM_SUCCESS;
101 }
BTM_SetInquiryMode(uint8_t mode)102 tBTM_STATUS BTM_SetInquiryMode(uint8_t mode) {
103   inc_func_call_count(__func__);
104   return BTM_SUCCESS;
105 }
BTM_StartInquiry(tBTM_INQ_RESULTS_CB * p_results_cb,tBTM_CMPL_CB * p_cmpl_cb)106 tBTM_STATUS BTM_StartInquiry(tBTM_INQ_RESULTS_CB* p_results_cb,
107                              tBTM_CMPL_CB* p_cmpl_cb) {
108   inc_func_call_count(__func__);
109   return BTM_SUCCESS;
110 }
btm_initiate_rem_name(const RawAddress & remote_bda,uint8_t origin,uint64_t timeout_ms,tBTM_CMPL_CB * p_cb)111 tBTM_STATUS btm_initiate_rem_name(const RawAddress& remote_bda, uint8_t origin,
112                                   uint64_t timeout_ms, tBTM_CMPL_CB* p_cb) {
113   inc_func_call_count(__func__);
114   return BTM_SUCCESS;
115 }
btm_inq_db_find(const RawAddress & p_bda)116 tINQ_DB_ENT* btm_inq_db_find(const RawAddress& p_bda) {
117   inc_func_call_count(__func__);
118   return nullptr;
119 }
btm_inq_db_new(const RawAddress & p_bda)120 tINQ_DB_ENT* btm_inq_db_new(const RawAddress& p_bda) {
121   inc_func_call_count(__func__);
122   return nullptr;
123 }
BTM_IsInquiryActive(void)124 uint16_t BTM_IsInquiryActive(void) {
125   inc_func_call_count(__func__);
126   return 0;
127 }
BTM_GetEirSupportedServices(uint32_t * p_eir_uuid,uint8_t ** p,uint8_t max_num_uuid16,uint8_t * p_num_uuid16)128 uint8_t BTM_GetEirSupportedServices(uint32_t* p_eir_uuid, uint8_t** p,
129                                     uint8_t max_num_uuid16,
130                                     uint8_t* p_num_uuid16) {
131   inc_func_call_count(__func__);
132   return 0;
133 }
BTM_GetEirUuidList(const uint8_t * p_eir,size_t eir_len,uint8_t uuid_size,uint8_t * p_num_uuid,uint8_t * p_uuid_list,uint8_t max_num_uuid)134 uint8_t BTM_GetEirUuidList(const uint8_t* p_eir, size_t eir_len,
135                            uint8_t uuid_size, uint8_t* p_num_uuid,
136                            uint8_t* p_uuid_list, uint8_t max_num_uuid) {
137   inc_func_call_count(__func__);
138   return 0;
139 }
BTM_AddEirService(uint32_t * p_eir_uuid,uint16_t uuid16)140 void BTM_AddEirService(uint32_t* p_eir_uuid, uint16_t uuid16) {
141   inc_func_call_count(__func__);
142 }
BTM_CancelInquiry(void)143 void BTM_CancelInquiry(void) { inc_func_call_count(__func__); }
BTM_EnableInterlacedInquiryScan()144 void BTM_EnableInterlacedInquiryScan() { inc_func_call_count(__func__); }
BTM_EnableInterlacedPageScan()145 void BTM_EnableInterlacedPageScan() { inc_func_call_count(__func__); }
btm_clr_inq_db(const RawAddress * p_bda)146 void btm_clr_inq_db(const RawAddress* p_bda) { inc_func_call_count(__func__); }
btm_clr_inq_result_flt(void)147 void btm_clr_inq_result_flt(void) { inc_func_call_count(__func__); }
btm_inq_clear_ssp(void)148 void btm_inq_clear_ssp(void) { inc_func_call_count(__func__); }
btm_inq_db_free(void)149 void btm_inq_db_free(void) { inc_func_call_count(__func__); }
btm_inq_db_init(void)150 void btm_inq_db_init(void) { inc_func_call_count(__func__); }
btm_inq_db_reset(void)151 void btm_inq_db_reset(void) { inc_func_call_count(__func__); }
btm_inq_remote_name_timer_timeout(UNUSED_ATTR void * data)152 void btm_inq_remote_name_timer_timeout(UNUSED_ATTR void* data) {
153   inc_func_call_count(__func__);
154 }
btm_inq_rmt_name_failed_cancelled(void)155 void btm_inq_rmt_name_failed_cancelled(void) { inc_func_call_count(__func__); }
btm_inq_stop_on_ssp(void)156 void btm_inq_stop_on_ssp(void) { inc_func_call_count(__func__); }
btm_process_cancel_complete(tHCI_STATUS status,uint8_t mode)157 void btm_process_cancel_complete(tHCI_STATUS status, uint8_t mode) {
158   inc_func_call_count(__func__);
159 }
btm_process_inq_complete(tHCI_STATUS status,uint8_t mode)160 void btm_process_inq_complete(tHCI_STATUS status, uint8_t mode) {
161   inc_func_call_count(__func__);
162 }
btm_process_inq_results(const uint8_t * p,uint8_t hci_evt_len,uint8_t inq_res_mode)163 void btm_process_inq_results(const uint8_t* p, uint8_t hci_evt_len,
164                              uint8_t inq_res_mode) {
165   inc_func_call_count(__func__);
166 }
btm_process_remote_name(const RawAddress * bda,const BD_NAME bdn,uint16_t evt_len,tHCI_STATUS hci_status)167 void btm_process_remote_name(const RawAddress* bda, const BD_NAME bdn,
168                              uint16_t evt_len, tHCI_STATUS hci_status) {
169   inc_func_call_count(__func__);
170 }
btm_set_eir_uuid(const uint8_t * p_eir,tBTM_INQ_RESULTS * p_results)171 void btm_set_eir_uuid(const uint8_t* p_eir, tBTM_INQ_RESULTS* p_results) {
172   inc_func_call_count(__func__);
173 }
btm_sort_inq_result(void)174 void btm_sort_inq_result(void) { inc_func_call_count(__func__); }
BTM_IsRemoteNameKnown(const RawAddress & bd_addr,tBT_TRANSPORT transport)175 bool BTM_IsRemoteNameKnown(const RawAddress& bd_addr, tBT_TRANSPORT transport) {
176   inc_func_call_count(__func__);
177   return false;
178 }
btm_clear_all_pending_le_entry(void)179 void btm_clear_all_pending_le_entry(void) { inc_func_call_count(__func__); }
180 
181 // Mocked functions complete
182 // END mockcify generation
183