1 /*
2  * Copyright 2022 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:6
19  *
20  *  mockcify.pl ver 0.5.0
21  */
22 // Mock include file to share data between tests and mock
23 #include "test/mock/mock_stack_avrc_utils.h"
24 
25 #include <cstdint>
26 
27 #include "test/common/mock_functions.h"
28 
29 // Original usings
30 
31 // Mocked internal structures, if any
32 
33 namespace test {
34 namespace mock {
35 namespace stack_avrc_utils {
36 
37 // Function state capture and return values, if needed
38 struct AVRC_IsValidAvcType AVRC_IsValidAvcType;
39 struct AVRC_IsValidPlayerAttr AVRC_IsValidPlayerAttr;
40 struct avrc_is_valid_opcode avrc_is_valid_opcode;
41 struct avrc_is_valid_player_attrib_value avrc_is_valid_player_attrib_value;
42 struct avrc_opcode_from_pdu avrc_opcode_from_pdu;
43 struct avrc_pars_pass_thru avrc_pars_pass_thru;
44 
45 }  // namespace stack_avrc_utils
46 }  // namespace mock
47 }  // namespace test
48 
49 // Mocked function return values, if any
50 namespace test {
51 namespace mock {
52 namespace stack_avrc_utils {
53 
54 bool AVRC_IsValidAvcType::return_value = false;
55 bool AVRC_IsValidPlayerAttr::return_value = false;
56 bool avrc_is_valid_opcode::return_value = false;
57 bool avrc_is_valid_player_attrib_value::return_value = false;
58 uint8_t avrc_opcode_from_pdu::return_value = 0;
59 tAVRC_STS avrc_pars_pass_thru::return_value = 0;
60 
61 }  // namespace stack_avrc_utils
62 }  // namespace mock
63 }  // namespace test
64 
65 // Mocked functions, if any
AVRC_IsValidAvcType(uint8_t pdu_id,uint8_t avc_type)66 bool AVRC_IsValidAvcType(uint8_t pdu_id, uint8_t avc_type) {
67   inc_func_call_count(__func__);
68   return test::mock::stack_avrc_utils::AVRC_IsValidAvcType(pdu_id, avc_type);
69 }
AVRC_IsValidPlayerAttr(uint8_t attr)70 bool AVRC_IsValidPlayerAttr(uint8_t attr) {
71   inc_func_call_count(__func__);
72   return test::mock::stack_avrc_utils::AVRC_IsValidPlayerAttr(attr);
73 }
avrc_is_valid_opcode(uint8_t opcode)74 bool avrc_is_valid_opcode(uint8_t opcode) {
75   inc_func_call_count(__func__);
76   return test::mock::stack_avrc_utils::avrc_is_valid_opcode(opcode);
77 }
avrc_is_valid_player_attrib_value(uint8_t attrib,uint8_t value)78 bool avrc_is_valid_player_attrib_value(uint8_t attrib, uint8_t value) {
79   inc_func_call_count(__func__);
80   return test::mock::stack_avrc_utils::avrc_is_valid_player_attrib_value(attrib,
81                                                                          value);
82 }
avrc_opcode_from_pdu(uint8_t pdu)83 uint8_t avrc_opcode_from_pdu(uint8_t pdu) {
84   inc_func_call_count(__func__);
85   return test::mock::stack_avrc_utils::avrc_opcode_from_pdu(pdu);
86 }
avrc_pars_pass_thru(tAVRC_MSG_PASS * p_msg,uint16_t * p_vendor_unique_id)87 tAVRC_STS avrc_pars_pass_thru(tAVRC_MSG_PASS* p_msg,
88                               uint16_t* p_vendor_unique_id) {
89   inc_func_call_count(__func__);
90   return test::mock::stack_avrc_utils::avrc_pars_pass_thru(p_msg,
91                                                            p_vendor_unique_id);
92 }
93 // Mocked functions complete
94 // END mockcify generation
95