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:20
20 */
21
22 #include "port_api.h"
23 #include "test/common/mock_functions.h"
24 #include "types/raw_address.h"
25
PORT_GetResultString(const uint8_t)26 const char* PORT_GetResultString(const uint8_t /* result_code */) {
27 inc_func_call_count(__func__);
28 return nullptr;
29 }
PORT_CheckConnection(uint16_t,RawAddress *,uint16_t *)30 int PORT_CheckConnection(uint16_t /* handle */, RawAddress* /* bd_addr */, uint16_t* /* p_lcid */) {
31 inc_func_call_count(__func__);
32 return 0;
33 }
PORT_ClearKeepHandleFlag(uint16_t)34 int PORT_ClearKeepHandleFlag(uint16_t /* port_handle */) {
35 inc_func_call_count(__func__);
36 return 0;
37 }
PORT_FlowControl_MaxCredit(uint16_t,bool)38 int PORT_FlowControl_MaxCredit(uint16_t /* handle */, bool /* enable */) {
39 inc_func_call_count(__func__);
40 return 0;
41 }
PORT_GetSettings(uint16_t,PortSettings *)42 int PORT_GetSettings(uint16_t /* handle */, PortSettings* /* p_settings */) {
43 inc_func_call_count(__func__);
44 return 0;
45 }
PORT_ReadData(uint16_t,char *,uint16_t,uint16_t *)46 int PORT_ReadData(uint16_t /* handle */, char* /* p_data */, uint16_t /* max_len */,
47 uint16_t* /* p_len */) {
48 inc_func_call_count(__func__);
49 return 0;
50 }
PORT_SetDataCOCallback(uint16_t,tPORT_DATA_CO_CALLBACK *)51 int PORT_SetDataCOCallback(uint16_t /* port_handle */, tPORT_DATA_CO_CALLBACK* /* p_port_cb */) {
52 inc_func_call_count(__func__);
53 return 0;
54 }
PORT_SetEventMaskAndCallback(uint16_t,uint32_t,tPORT_CALLBACK *)55 int PORT_SetEventMaskAndCallback(uint16_t /* port_handle */, uint32_t /* mask */,
56 tPORT_CALLBACK* /* p_port_cb */) {
57 inc_func_call_count(__func__);
58 return 0;
59 }
PORT_SetSettings(uint16_t,PortSettings *)60 int PORT_SetSettings(uint16_t /* handle */, PortSettings* /* p_settings */) {
61 inc_func_call_count(__func__);
62 return 0;
63 }
PORT_WriteData(uint16_t,const char *,uint16_t,uint16_t *)64 int PORT_WriteData(uint16_t /* handle */, const char* /* p_data */, uint16_t /* max_len */,
65 uint16_t* /* p_len */) {
66 inc_func_call_count(__func__);
67 return 0;
68 }
PORT_WriteDataCO(uint16_t,int *)69 int PORT_WriteDataCO(uint16_t /* handle */, int* /* p_len */) {
70 inc_func_call_count(__func__);
71 return 0;
72 }
RFCOMM_CreateConnectionWithSecurity(uint16_t,uint8_t,bool,uint16_t,const RawAddress &,uint16_t *,tPORT_MGMT_CALLBACK *,uint16_t,RfcommCfgInfo)73 int RFCOMM_CreateConnectionWithSecurity(uint16_t /* uuid */, uint8_t /* scn */,
74 bool /* is_server */, uint16_t /* mtu */,
75 const RawAddress& /* bd_addr */, uint16_t* /* p_handle */,
76 tPORT_MGMT_CALLBACK* /* p_mgmt_callback */,
77 uint16_t /* sec_mask */, RfcommCfgInfo /* cfg */) {
78 inc_func_call_count(__func__);
79 return 0;
80 }
RFCOMM_ControlReqFromBTSOCK(uint8_t,const RawAddress &,uint8_t,uint8_t,uint8_t,uint8_t,bool)81 int RFCOMM_ControlReqFromBTSOCK(uint8_t /* dlci */, const RawAddress& /* bd_addr */,
82 uint8_t /* modem_signal */, uint8_t /* break_signal */,
83 uint8_t /* discard_buffers */, uint8_t /* break_signal_seq */,
84 bool /* fc */) {
85 inc_func_call_count(__func__);
86 return 0;
87 }
RFCOMM_RemoveConnection(uint16_t)88 int RFCOMM_RemoveConnection(uint16_t /* handle */) {
89 inc_func_call_count(__func__);
90 return 0;
91 }
RFCOMM_RemoveServer(uint16_t)92 int RFCOMM_RemoveServer(uint16_t /* handle */) {
93 inc_func_call_count(__func__);
94 return 0;
95 }
PORT_GetSecurityMask(uint16_t,uint16_t *)96 int PORT_GetSecurityMask(uint16_t /* handle */, uint16_t* /* sec_mask */) {
97 inc_func_call_count(__func__);
98 return 0;
99 }
PORT_GetChannelInfo(uint16_t,uint16_t *,uint16_t *,uint16_t *,uint16_t *,uint16_t *,uint16_t *,uint16_t *,uint16_t *,uint16_t *,bool *)100 int PORT_GetChannelInfo(uint16_t /* handle */, uint16_t* /* local_mtu */,
101 uint16_t* /* remote_mtu */, uint16_t* /* local_credit */,
102 uint16_t* /* remote_credit */, uint16_t* /* local_cid */,
103 uint16_t* /* remote_cid */, uint16_t* /* dlci */,
104 uint16_t* /* max_frame_size */, uint16_t* /* acl_handle */,
105 bool* /* mux_initiator */) {
106 inc_func_call_count(__func__);
107 return 0;
108 }
RFCOMM_Init(void)109 void RFCOMM_Init(void) { inc_func_call_count(__func__); }
PORT_IsCollisionDetected(RawAddress)110 bool PORT_IsCollisionDetected(RawAddress /* bd_addr */) {
111 inc_func_call_count(__func__);
112 return false;
113 }
PORT_SetAppUid(uint16_t,uint32_t)114 int PORT_SetAppUid(uint16_t /* handle */, uint32_t /* app_uid */) {
115 inc_func_call_count(__func__);
116 return 0;
117 }
PORT_SetSdpDuration(uint16_t,uint64_t)118 int PORT_SetSdpDuration(uint16_t /* handle */, uint64_t /* sdp_duration_ms */) {
119 inc_func_call_count(__func__);
120 return 0;
121 }
122