1 /*
2 * Copyright 2023 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 * Generated mock file from original source file
18 * Functions generated:24
19 *
20 * mockcify.pl ver 0.6.3
21 */
22
23 // Mock include file to share data between tests and mock
24 #include "test/mock/mock_bta_av_api.h"
25
26 #include <cstdint>
27
28 #include "test/common/mock_functions.h"
29
30 // Original usings
31
32 // Mocked internal structures, if any
33
34 namespace test {
35 namespace mock {
36 namespace bta_av_api {
37
38 // Function state capture and return values, if needed
39 struct BTA_AvClose BTA_AvClose;
40 struct BTA_AvCloseRc BTA_AvCloseRc;
41 struct BTA_AvDeregister BTA_AvDeregister;
42 struct BTA_AvDisable BTA_AvDisable;
43 struct BTA_AvDisconnect BTA_AvDisconnect;
44 struct BTA_AvEnable BTA_AvEnable;
45 struct BTA_AvMetaCmd BTA_AvMetaCmd;
46 struct BTA_AvMetaRsp BTA_AvMetaRsp;
47 struct BTA_AvOffloadStart BTA_AvOffloadStart;
48 struct BTA_AvOpen BTA_AvOpen;
49 struct BTA_AvOpenRc BTA_AvOpenRc;
50 struct BTA_AvProtectReq BTA_AvProtectReq;
51 struct BTA_AvProtectRsp BTA_AvProtectRsp;
52 struct BTA_AvReconfig BTA_AvReconfig;
53 struct BTA_AvRegister BTA_AvRegister;
54 struct BTA_AvRemoteCmd BTA_AvRemoteCmd;
55 struct BTA_AvRemoteVendorUniqueCmd BTA_AvRemoteVendorUniqueCmd;
56 struct BTA_AvSetLatency BTA_AvSetLatency;
57 struct BTA_AvSetPeerSep BTA_AvSetPeerSep;
58 struct BTA_AvStart BTA_AvStart;
59 struct BTA_AvStop BTA_AvStop;
60 struct BTA_AvVendorCmd BTA_AvVendorCmd;
61 struct BTA_AvVendorRsp BTA_AvVendorRsp;
62
63 } // namespace bta_av_api
64 } // namespace mock
65 } // namespace test
66
67 // Mocked function return values, if any
68 namespace test {
69 namespace mock {
70 namespace bta_av_api {} // namespace bta_av_api
71 } // namespace mock
72 } // namespace test
73
74 // Mocked functions, if any
BTA_AvClose(tBTA_AV_HNDL handle)75 void BTA_AvClose(tBTA_AV_HNDL handle) {
76 inc_func_call_count(__func__);
77 test::mock::bta_av_api::BTA_AvClose(handle);
78 }
BTA_AvCloseRc(uint8_t rc_handle)79 void BTA_AvCloseRc(uint8_t rc_handle) {
80 inc_func_call_count(__func__);
81 test::mock::bta_av_api::BTA_AvCloseRc(rc_handle);
82 }
BTA_AvDeregister(tBTA_AV_HNDL hndl)83 void BTA_AvDeregister(tBTA_AV_HNDL hndl) {
84 inc_func_call_count(__func__);
85 test::mock::bta_av_api::BTA_AvDeregister(hndl);
86 }
BTA_AvDisable(void)87 void BTA_AvDisable(void) {
88 inc_func_call_count(__func__);
89 test::mock::bta_av_api::BTA_AvDisable();
90 }
BTA_AvDisconnect(tBTA_AV_HNDL handle)91 void BTA_AvDisconnect(tBTA_AV_HNDL handle) {
92 inc_func_call_count(__func__);
93 test::mock::bta_av_api::BTA_AvDisconnect(handle);
94 }
BTA_AvEnable(tBTA_AV_FEAT features,tBTA_AV_CBACK * p_cback)95 void BTA_AvEnable(tBTA_AV_FEAT features, tBTA_AV_CBACK* p_cback) {
96 inc_func_call_count(__func__);
97 test::mock::bta_av_api::BTA_AvEnable(features, p_cback);
98 }
BTA_AvMetaCmd(uint8_t rc_handle,uint8_t label,tBTA_AV_CMD cmd_code,BT_HDR * p_pkt)99 void BTA_AvMetaCmd(uint8_t rc_handle, uint8_t label, tBTA_AV_CMD cmd_code,
100 BT_HDR* p_pkt) {
101 inc_func_call_count(__func__);
102 test::mock::bta_av_api::BTA_AvMetaCmd(rc_handle, label, cmd_code, p_pkt);
103 }
BTA_AvMetaRsp(uint8_t rc_handle,uint8_t label,tBTA_AV_CODE rsp_code,BT_HDR * p_pkt)104 void BTA_AvMetaRsp(uint8_t rc_handle, uint8_t label, tBTA_AV_CODE rsp_code,
105 BT_HDR* p_pkt) {
106 inc_func_call_count(__func__);
107 test::mock::bta_av_api::BTA_AvMetaRsp(rc_handle, label, rsp_code, p_pkt);
108 }
BTA_AvOffloadStart(tBTA_AV_HNDL hndl)109 void BTA_AvOffloadStart(tBTA_AV_HNDL hndl) {
110 inc_func_call_count(__func__);
111 test::mock::bta_av_api::BTA_AvOffloadStart(hndl);
112 }
BTA_AvOpen(const RawAddress & bd_addr,tBTA_AV_HNDL handle,bool use_rc,uint16_t uuid)113 void BTA_AvOpen(const RawAddress& bd_addr, tBTA_AV_HNDL handle, bool use_rc,
114 uint16_t uuid) {
115 inc_func_call_count(__func__);
116 test::mock::bta_av_api::BTA_AvOpen(bd_addr, handle, use_rc, uuid);
117 }
BTA_AvOpenRc(tBTA_AV_HNDL handle)118 void BTA_AvOpenRc(tBTA_AV_HNDL handle) {
119 inc_func_call_count(__func__);
120 test::mock::bta_av_api::BTA_AvOpenRc(handle);
121 }
BTA_AvProtectReq(tBTA_AV_HNDL hndl,uint8_t * p_data,uint16_t len)122 void BTA_AvProtectReq(tBTA_AV_HNDL hndl, uint8_t* p_data, uint16_t len) {
123 inc_func_call_count(__func__);
124 test::mock::bta_av_api::BTA_AvProtectReq(hndl, p_data, len);
125 }
BTA_AvProtectRsp(tBTA_AV_HNDL hndl,uint8_t error_code,uint8_t * p_data,uint16_t len)126 void BTA_AvProtectRsp(tBTA_AV_HNDL hndl, uint8_t error_code, uint8_t* p_data,
127 uint16_t len) {
128 inc_func_call_count(__func__);
129 test::mock::bta_av_api::BTA_AvProtectRsp(hndl, error_code, p_data, len);
130 }
BTA_AvReconfig(tBTA_AV_HNDL hndl,bool suspend,uint8_t sep_info_idx,uint8_t * p_codec_info,uint8_t num_protect,const uint8_t * p_protect_info)131 void BTA_AvReconfig(tBTA_AV_HNDL hndl, bool suspend, uint8_t sep_info_idx,
132 uint8_t* p_codec_info, uint8_t num_protect,
133 const uint8_t* p_protect_info) {
134 inc_func_call_count(__func__);
135 test::mock::bta_av_api::BTA_AvReconfig(
136 hndl, suspend, sep_info_idx, p_codec_info, num_protect, p_protect_info);
137 }
BTA_AvRegister(tBTA_AV_CHNL chnl,const char * p_service_name,uint8_t app_id,tBTA_AV_SINK_DATA_CBACK * p_sink_data_cback,uint16_t service_uuid)138 void BTA_AvRegister(tBTA_AV_CHNL chnl, const char* p_service_name,
139 uint8_t app_id, tBTA_AV_SINK_DATA_CBACK* p_sink_data_cback,
140 uint16_t service_uuid) {
141 inc_func_call_count(__func__);
142 test::mock::bta_av_api::BTA_AvRegister(chnl, p_service_name, app_id,
143 p_sink_data_cback, service_uuid);
144 }
BTA_AvRemoteCmd(uint8_t rc_handle,uint8_t label,tBTA_AV_RC rc_id,tBTA_AV_STATE key_state)145 void BTA_AvRemoteCmd(uint8_t rc_handle, uint8_t label, tBTA_AV_RC rc_id,
146 tBTA_AV_STATE key_state) {
147 inc_func_call_count(__func__);
148 test::mock::bta_av_api::BTA_AvRemoteCmd(rc_handle, label, rc_id, key_state);
149 }
BTA_AvRemoteVendorUniqueCmd(uint8_t rc_handle,uint8_t label,tBTA_AV_STATE key_state,uint8_t * p_msg,uint8_t buf_len)150 void BTA_AvRemoteVendorUniqueCmd(uint8_t rc_handle, uint8_t label,
151 tBTA_AV_STATE key_state, uint8_t* p_msg,
152 uint8_t buf_len) {
153 inc_func_call_count(__func__);
154 test::mock::bta_av_api::BTA_AvRemoteVendorUniqueCmd(
155 rc_handle, label, key_state, p_msg, buf_len);
156 }
BTA_AvSetLatency(tBTA_AV_HNDL handle,bool is_low_latency)157 void BTA_AvSetLatency(tBTA_AV_HNDL handle, bool is_low_latency) {
158 inc_func_call_count(__func__);
159 test::mock::bta_av_api::BTA_AvSetLatency(handle, is_low_latency);
160 }
BTA_AvSetPeerSep(const RawAddress & bdaddr,uint8_t sep)161 void BTA_AvSetPeerSep(const RawAddress& bdaddr, uint8_t sep) {
162 inc_func_call_count(__func__);
163 test::mock::bta_av_api::BTA_AvSetPeerSep(bdaddr, sep);
164 }
BTA_AvStart(tBTA_AV_HNDL handle,bool use_latency_mode)165 void BTA_AvStart(tBTA_AV_HNDL handle, bool use_latency_mode) {
166 inc_func_call_count(__func__);
167 test::mock::bta_av_api::BTA_AvStart(handle, use_latency_mode);
168 }
BTA_AvStop(tBTA_AV_HNDL handle,bool suspend)169 void BTA_AvStop(tBTA_AV_HNDL handle, bool suspend) {
170 inc_func_call_count(__func__);
171 test::mock::bta_av_api::BTA_AvStop(handle, suspend);
172 }
BTA_AvVendorCmd(uint8_t rc_handle,uint8_t label,tBTA_AV_CODE cmd_code,uint8_t * p_data,uint16_t len)173 void BTA_AvVendorCmd(uint8_t rc_handle, uint8_t label, tBTA_AV_CODE cmd_code,
174 uint8_t* p_data, uint16_t len) {
175 inc_func_call_count(__func__);
176 test::mock::bta_av_api::BTA_AvVendorCmd(rc_handle, label, cmd_code, p_data,
177 len);
178 }
BTA_AvVendorRsp(uint8_t rc_handle,uint8_t label,tBTA_AV_CODE rsp_code,uint8_t * p_data,uint16_t len,uint32_t company_id)179 void BTA_AvVendorRsp(uint8_t rc_handle, uint8_t label, tBTA_AV_CODE rsp_code,
180 uint8_t* p_data, uint16_t len, uint32_t company_id) {
181 inc_func_call_count(__func__);
182 test::mock::bta_av_api::BTA_AvVendorRsp(rc_handle, label, rsp_code, p_data,
183 len, company_id);
184 }
185 // Mocked functions complete
186 // END mockcify generation
187