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:12
20 */
21
22 #include <cstdint>
23
24 #include "test/common/mock_functions.h"
25 #include "udrv/include/uipc.h"
26
27 std::unique_ptr<tUIPC_STATE> mock_uipc_init_ret;
28 uint32_t mock_uipc_read_ret;
29 bool mock_uipc_send_ret;
30
UIPC_Open(tUIPC_STATE &,tUIPC_CH_ID,tUIPC_RCV_CBACK *,const char *)31 bool UIPC_Open(tUIPC_STATE& /* uipc */, tUIPC_CH_ID /* ch_id */,
32 tUIPC_RCV_CBACK* /* p_cback */, const char* /* socket_path */) {
33 inc_func_call_count(__func__);
34 return false;
35 }
UIPC_Send(tUIPC_STATE &,tUIPC_CH_ID,uint16_t,const uint8_t *,uint16_t)36 bool UIPC_Send(tUIPC_STATE& /* uipc */, tUIPC_CH_ID /* ch_id */,
37 uint16_t /* msg_evt */, const uint8_t* /* p_buf */,
38 uint16_t /* msglen */) {
39 inc_func_call_count(__func__);
40 return mock_uipc_send_ret;
41 }
uipc_start_main_server_thread(tUIPC_STATE &)42 int uipc_start_main_server_thread(tUIPC_STATE& /* uipc */) {
43 inc_func_call_count(__func__);
44 return 0;
45 }
UIPC_Init()46 std::unique_ptr<tUIPC_STATE> UIPC_Init() {
47 inc_func_call_count(__func__);
48 return std::move(mock_uipc_init_ret);
49 }
dump_uipc_event(tUIPC_EVENT)50 const char* dump_uipc_event(tUIPC_EVENT /* event */) {
51 inc_func_call_count(__func__);
52 return nullptr;
53 }
UIPC_Read(tUIPC_STATE &,tUIPC_CH_ID,uint8_t *,uint32_t)54 uint32_t UIPC_Read(tUIPC_STATE& /* uipc */, tUIPC_CH_ID /* ch_id */,
55 uint8_t* /* p_buf */, uint32_t /* len */) {
56 inc_func_call_count(__func__);
57 return mock_uipc_read_ret;
58 }
UIPC_Ioctl(tUIPC_STATE &,tUIPC_CH_ID,uint32_t,void *)59 bool UIPC_Ioctl(tUIPC_STATE& /* uipc */, tUIPC_CH_ID /* ch_id */,
60 uint32_t /* request */, void* /* param */) {
61 inc_func_call_count(__func__);
62 return false;
63 }
UIPC_Close(tUIPC_STATE &,tUIPC_CH_ID)64 void UIPC_Close(tUIPC_STATE& /* uipc */, tUIPC_CH_ID /* ch_id */) {
65 inc_func_call_count(__func__);
66 }
uipc_close_locked(tUIPC_STATE &,tUIPC_CH_ID)67 void uipc_close_locked(tUIPC_STATE& /* uipc */, tUIPC_CH_ID /* ch_id */) {
68 inc_func_call_count(__func__);
69 }
uipc_main_cleanup(tUIPC_STATE &)70 void uipc_main_cleanup(tUIPC_STATE& /* uipc */) {
71 inc_func_call_count(__func__);
72 }
uipc_stop_main_server_thread(tUIPC_STATE &)73 void uipc_stop_main_server_thread(tUIPC_STATE& /* uipc */) {
74 inc_func_call_count(__func__);
75 }
76