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 <map>
23 #include <string>
24
25 extern std::map<std::string, int> mock_function_count_map;
26
27 #include <errno.h>
28 #include <fcntl.h>
29 #include <signal.h>
30 #include <stdio.h>
31 #include <stdlib.h>
32 #include <string.h>
33 #include <sys/mman.h>
34 #include <sys/poll.h>
35 #include <sys/prctl.h>
36 #include <sys/select.h>
37 #include <sys/socket.h>
38 #include <sys/stat.h>
39 #include <sys/un.h>
40 #include <unistd.h>
41 #include <mutex>
42 #include <set>
43 #include "audio_a2dp_hw/include/audio_a2dp_hw.h"
44 #include "bt_common.h"
45 #include "bt_types.h"
46 #include "bt_utils.h"
47 #include "osi/include/osi.h"
48 #include "osi/include/socket_utils/sockets.h"
49 #include "uipc.h"
50
51 #ifndef UNUSED_ATTR
52 #define UNUSED_ATTR
53 #endif
54
UIPC_Open(tUIPC_STATE & uipc,tUIPC_CH_ID ch_id,tUIPC_RCV_CBACK * p_cback,const char * socket_path)55 bool UIPC_Open(tUIPC_STATE& uipc, tUIPC_CH_ID ch_id, tUIPC_RCV_CBACK* p_cback,
56 const char* socket_path) {
57 mock_function_count_map[__func__]++;
58 return false;
59 }
UIPC_Send(tUIPC_STATE & uipc,tUIPC_CH_ID ch_id,UNUSED_ATTR uint16_t msg_evt,const uint8_t * p_buf,uint16_t msglen)60 bool UIPC_Send(tUIPC_STATE& uipc, tUIPC_CH_ID ch_id,
61 UNUSED_ATTR uint16_t msg_evt, const uint8_t* p_buf,
62 uint16_t msglen) {
63 mock_function_count_map[__func__]++;
64 return false;
65 }
uipc_start_main_server_thread(tUIPC_STATE & uipc)66 int uipc_start_main_server_thread(tUIPC_STATE& uipc) {
67 mock_function_count_map[__func__]++;
68 return 0;
69 }
UIPC_Init()70 std::unique_ptr<tUIPC_STATE> UIPC_Init() {
71 mock_function_count_map[__func__]++;
72 return nullptr;
73 }
dump_uipc_event(tUIPC_EVENT event)74 const char* dump_uipc_event(tUIPC_EVENT event) {
75 mock_function_count_map[__func__]++;
76 return nullptr;
77 }
UIPC_Read(tUIPC_STATE & uipc,tUIPC_CH_ID ch_id,UNUSED_ATTR uint16_t * p_msg_evt,uint8_t * p_buf,uint32_t len)78 uint32_t UIPC_Read(tUIPC_STATE& uipc, tUIPC_CH_ID ch_id,
79 UNUSED_ATTR uint16_t* p_msg_evt, uint8_t* p_buf,
80 uint32_t len) {
81 mock_function_count_map[__func__]++;
82 return 0;
83 }
UIPC_Ioctl(tUIPC_STATE & uipc,tUIPC_CH_ID ch_id,uint32_t request,void * param)84 bool UIPC_Ioctl(tUIPC_STATE& uipc, tUIPC_CH_ID ch_id, uint32_t request,
85 void* param) {
86 mock_function_count_map[__func__]++;
87 return false;
88 }
UIPC_Close(tUIPC_STATE & uipc,tUIPC_CH_ID ch_id)89 void UIPC_Close(tUIPC_STATE& uipc, tUIPC_CH_ID ch_id) {
90 mock_function_count_map[__func__]++;
91 }
uipc_close_locked(tUIPC_STATE & uipc,tUIPC_CH_ID ch_id)92 void uipc_close_locked(tUIPC_STATE& uipc, tUIPC_CH_ID ch_id) {
93 mock_function_count_map[__func__]++;
94 }
uipc_main_cleanup(tUIPC_STATE & uipc)95 void uipc_main_cleanup(tUIPC_STATE& uipc) {
96 mock_function_count_map[__func__]++;
97 }
uipc_stop_main_server_thread(tUIPC_STATE & uipc)98 void uipc_stop_main_server_thread(tUIPC_STATE& uipc) {
99 mock_function_count_map[__func__]++;
100 }
101