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:22
20  */
21 
22 #include <base/functional/bind.h>
23 #include <base/location.h>
24 
25 #include <cstdint>
26 #include <memory>
27 
28 #include "bta/include/bta_jv_api.h"
29 #include "stack/include/bt_hdr.h"
30 #include "test/common/mock_functions.h"
31 #include "types/bluetooth/uuid.h"
32 #include "types/raw_address.h"
33 
BTA_JvCreateRecordByUser(uint32_t)34 tBTA_JV_STATUS BTA_JvCreateRecordByUser(uint32_t /* rfcomm_slot_id */) {
35   inc_func_call_count(__func__);
36   return tBTA_JV_STATUS::SUCCESS;
37 }
BTA_JvDeleteRecord(uint32_t)38 tBTA_JV_STATUS BTA_JvDeleteRecord(uint32_t /* handle */) {
39   inc_func_call_count(__func__);
40   return tBTA_JV_STATUS::SUCCESS;
41 }
BTA_JvEnable(tBTA_JV_DM_CBACK *)42 tBTA_JV_STATUS BTA_JvEnable(tBTA_JV_DM_CBACK* /* p_cback */) {
43   inc_func_call_count(__func__);
44   return tBTA_JV_STATUS::SUCCESS;
45 }
BTA_JvFreeChannel(uint16_t,tBTA_JV_CONN_TYPE)46 tBTA_JV_STATUS BTA_JvFreeChannel(uint16_t /* channel */,
47                                  tBTA_JV_CONN_TYPE /* conn_type */) {
48   inc_func_call_count(__func__);
49   return tBTA_JV_STATUS::SUCCESS;
50 }
BTA_JvL2capClose(uint32_t)51 tBTA_JV_STATUS BTA_JvL2capClose(uint32_t /* handle */) {
52   inc_func_call_count(__func__);
53   return tBTA_JV_STATUS::SUCCESS;
54 }
BTA_JvL2capRead(uint32_t,uint32_t,uint8_t *,uint16_t)55 tBTA_JV_STATUS BTA_JvL2capRead(uint32_t /* handle */, uint32_t /* req_id */,
56                                uint8_t* /* p_data */, uint16_t /* len */) {
57   inc_func_call_count(__func__);
58   return tBTA_JV_STATUS::SUCCESS;
59 }
BTA_JvL2capReady(uint32_t,uint32_t *)60 tBTA_JV_STATUS BTA_JvL2capReady(uint32_t /* handle */,
61                                 uint32_t* /* p_data_size */) {
62   inc_func_call_count(__func__);
63   return tBTA_JV_STATUS::SUCCESS;
64 }
BTA_JvL2capStopServer(uint16_t,uint32_t)65 tBTA_JV_STATUS BTA_JvL2capStopServer(uint16_t /* local_psm */,
66                                      uint32_t /* l2cap_socket_id */) {
67   inc_func_call_count(__func__);
68   return tBTA_JV_STATUS::SUCCESS;
69 }
BTA_JvL2capWrite(uint32_t,uint32_t,BT_HDR *,uint32_t)70 tBTA_JV_STATUS BTA_JvL2capWrite(uint32_t /* handle */, uint32_t /* req_id */,
71                                 BT_HDR* /* msg */, uint32_t /* user_id */) {
72   inc_func_call_count(__func__);
73   return tBTA_JV_STATUS::SUCCESS;
74 }
BTA_JvRfcommClose(uint32_t,uint32_t)75 tBTA_JV_STATUS BTA_JvRfcommClose(uint32_t /* handle */,
76                                  uint32_t /* rfcomm_slot_id */) {
77   inc_func_call_count(__func__);
78   return tBTA_JV_STATUS::SUCCESS;
79 }
BTA_JvRfcommConnect(tBTA_SEC,uint8_t,const RawAddress &,tBTA_JV_RFCOMM_CBACK *,uint32_t)80 tBTA_JV_STATUS BTA_JvRfcommConnect(tBTA_SEC /* sec_mask */,
81                                    uint8_t /* remote_scn */,
82                                    const RawAddress& /* peer_bd_addr */,
83                                    tBTA_JV_RFCOMM_CBACK* /* p_cback */,
84                                    uint32_t /* rfcomm_slot_id */) {
85   inc_func_call_count(__func__);
86   return tBTA_JV_STATUS::SUCCESS;
87 }
BTA_JvRfcommStartServer(tBTA_SEC,uint8_t,uint8_t,tBTA_JV_RFCOMM_CBACK *,uint32_t)88 tBTA_JV_STATUS BTA_JvRfcommStartServer(tBTA_SEC /* sec_mask */,
89                                        uint8_t /* local_scn */,
90                                        uint8_t /* max_session */,
91                                        tBTA_JV_RFCOMM_CBACK* /* p_cback */,
92                                        uint32_t /* rfcomm_slot_id */) {
93   inc_func_call_count(__func__);
94   return tBTA_JV_STATUS::SUCCESS;
95 }
BTA_JvRfcommStopServer(uint32_t,uint32_t)96 tBTA_JV_STATUS BTA_JvRfcommStopServer(uint32_t /* handle */,
97                                       uint32_t /* rfcomm_slot_id */) {
98   inc_func_call_count(__func__);
99   return tBTA_JV_STATUS::SUCCESS;
100 }
BTA_JvRfcommWrite(uint32_t,uint32_t)101 tBTA_JV_STATUS BTA_JvRfcommWrite(uint32_t /* handle */, uint32_t /* req_id */) {
102   inc_func_call_count(__func__);
103   return tBTA_JV_STATUS::SUCCESS;
104 }
BTA_JvSetPmProfile(uint32_t,tBTA_JV_PM_ID,tBTA_JV_CONN_STATE)105 tBTA_JV_STATUS BTA_JvSetPmProfile(uint32_t /* handle */,
106                                   tBTA_JV_PM_ID /* app_id */,
107                                   tBTA_JV_CONN_STATE /* init_st */) {
108   inc_func_call_count(__func__);
109   return tBTA_JV_STATUS::SUCCESS;
110 }
BTA_JvStartDiscovery(const RawAddress &,uint16_t,const bluetooth::Uuid *,uint32_t)111 tBTA_JV_STATUS BTA_JvStartDiscovery(const RawAddress& /* bd_addr */,
112                                     uint16_t /* num_uuid */,
113                                     const bluetooth::Uuid* /* p_uuid_list */,
114                                     uint32_t /* rfcomm_slot_id */) {
115   inc_func_call_count(__func__);
116   return tBTA_JV_STATUS::SUCCESS;
117 }
BTA_JvRfcommGetPortHdl(uint32_t)118 uint16_t BTA_JvRfcommGetPortHdl(uint32_t /* handle */) {
119   inc_func_call_count(__func__);
120   return 0;
121 }
BTA_JvDisable(void)122 void BTA_JvDisable(void) { inc_func_call_count(__func__); }
BTA_JvGetChannelId(tBTA_JV_CONN_TYPE,uint32_t,int32_t)123 void BTA_JvGetChannelId(tBTA_JV_CONN_TYPE /* conn_type */, uint32_t /* id */,
124                         int32_t /* channel */) {
125   inc_func_call_count(__func__);
126 }
BTA_JvL2capConnect(tBTA_JV_CONN_TYPE,tBTA_SEC,std::unique_ptr<tL2CAP_ERTM_INFO>,uint16_t,uint16_t,std::unique_ptr<tL2CAP_CFG_INFO>,const RawAddress &,tBTA_JV_L2CAP_CBACK *,uint32_t)127 void BTA_JvL2capConnect(tBTA_JV_CONN_TYPE /* conn_type */,
128                         tBTA_SEC /* sec_mask */,
129                         std::unique_ptr<tL2CAP_ERTM_INFO> /* ertm_info */,
130                         uint16_t /* remote_psm */, uint16_t /* rx_mtu */,
131                         std::unique_ptr<tL2CAP_CFG_INFO> /* cfg */,
132                         const RawAddress& /* peer_bd_addr */,
133                         tBTA_JV_L2CAP_CBACK* /* p_cback */,
134                         uint32_t /* l2cap_socket_id */) {
135   inc_func_call_count(__func__);
136 }
BTA_JvL2capStartServer(tBTA_JV_CONN_TYPE,tBTA_SEC,std::unique_ptr<tL2CAP_ERTM_INFO>,uint16_t,uint16_t,std::unique_ptr<tL2CAP_CFG_INFO>,tBTA_JV_L2CAP_CBACK *,uint32_t)137 void BTA_JvL2capStartServer(tBTA_JV_CONN_TYPE /* conn_type */,
138                             tBTA_SEC /* sec_mask */,
139                             std::unique_ptr<tL2CAP_ERTM_INFO> /* ertm_info */,
140                             uint16_t /* local_psm */, uint16_t /* rx_mtu */,
141                             std::unique_ptr<tL2CAP_CFG_INFO> /* cfg */,
142                             tBTA_JV_L2CAP_CBACK* /* p_cback */,
143                             uint32_t /* l2cap_socket_id */) {
144   inc_func_call_count(__func__);
145 }
146