aboutsummaryrefslogtreecommitdiff
path: root/test/mock/mock_stack_rfcomm_port_api.cc
blob: c2b619901d74145ef9ef3e9dd35a7aa83a944538 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
/*
 * Copyright 2021 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

/*
 * Generated mock file from original source file
 *   Functions generated:20
 */

#include <map>
#include <string>

extern std::map<std::string, int> mock_function_count_map;

#include <base/logging.h>
#include <string.h>
#include "bt_common.h"
#include "l2c_api.h"
#include "osi/include/log.h"
#include "osi/include/mutex.h"
#include "port_api.h"
#include "rfcdefs.h"
#include "sdp_api.h"
#include "stack/include/btm_api_types.h"
#include "stack/rfcomm/port_int.h"
#include "stack/rfcomm/rfc_int.h"

#ifndef UNUSED_ATTR
#define UNUSED_ATTR
#endif

bool PORT_IsOpening(RawAddress* bd_addr) {
  mock_function_count_map[__func__]++;
  return false;
}
const char* PORT_GetResultString(const uint8_t result_code) {
  mock_function_count_map[__func__]++;
  return nullptr;
}
int PORT_CheckConnection(uint16_t handle, RawAddress* bd_addr,
                         uint16_t* p_lcid) {
  mock_function_count_map[__func__]++;
  return 0;
}
int PORT_ClearKeepHandleFlag(uint16_t port_handle) {
  mock_function_count_map[__func__]++;
  return 0;
}
int PORT_FlowControl_MaxCredit(uint16_t handle, bool enable) {
  mock_function_count_map[__func__]++;
  return 0;
}
int PORT_GetState(uint16_t handle, tPORT_STATE* p_settings) {
  mock_function_count_map[__func__]++;
  return 0;
}
int PORT_ReadData(uint16_t handle, char* p_data, uint16_t max_len,
                  uint16_t* p_len) {
  mock_function_count_map[__func__]++;
  return 0;
}
int PORT_SetDataCOCallback(uint16_t port_handle,
                           tPORT_DATA_CO_CALLBACK* p_port_cb) {
  mock_function_count_map[__func__]++;
  return 0;
}
int PORT_SetEventCallback(uint16_t port_handle, tPORT_CALLBACK* p_port_cb) {
  mock_function_count_map[__func__]++;
  return 0;
}
int PORT_SetEventMask(uint16_t port_handle, uint32_t mask) {
  mock_function_count_map[__func__]++;
  return 0;
}
int PORT_SetState(uint16_t handle, tPORT_STATE* p_settings) {
  mock_function_count_map[__func__]++;
  return 0;
}
int PORT_WriteData(uint16_t handle, const char* p_data, uint16_t max_len,
                   uint16_t* p_len) {
  mock_function_count_map[__func__]++;
  return 0;
}
int PORT_WriteDataCO(uint16_t handle, int* p_len) {
  mock_function_count_map[__func__]++;
  return 0;
}
int RFCOMM_CreateConnection(uint16_t uuid, uint8_t scn, bool is_server,
                            uint16_t mtu, const RawAddress& bd_addr,
                            uint16_t* p_handle, tPORT_CALLBACK* p_mgmt_cb) {
  mock_function_count_map[__func__]++;
  return 0;
}
int RFCOMM_CreateConnectionWithSecurity(uint16_t uuid, uint8_t scn,
                                        bool is_server, uint16_t mtu,
                                        const RawAddress& bd_addr,
                                        uint16_t* p_handle,
                                        tPORT_CALLBACK* p_mgmt_cb,
                                        uint16_t sec_mask) {
  mock_function_count_map[__func__]++;
  return 0;
}
int RFCOMM_RemoveConnection(uint16_t handle) {
  mock_function_count_map[__func__]++;
  return 0;
}
int RFCOMM_RemoveServer(uint16_t handle) {
  mock_function_count_map[__func__]++;
  return 0;
}
uint8_t PORT_SetTraceLevel(uint8_t new_level) {
  mock_function_count_map[__func__]++;
  return 0;
}
void RFCOMM_ClearSecurityRecord(uint32_t scn) {
  mock_function_count_map[__func__]++;
}
void RFCOMM_Init(void) { mock_function_count_map[__func__]++; }