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 #pragma once 17 18 /* 19 * Generated mock file from original source file 20 * Functions generated:6 21 * 22 * mockcify.pl ver 0.5.0 23 */ 24 25 #include <cstdint> 26 #include <functional> 27 28 // Original included files, if any 29 #include "stack/include/avrc_defs.h" 30 31 // Original usings 32 33 // Mocked compile conditionals, if any 34 35 namespace test { 36 namespace mock { 37 namespace stack_avrc_utils { 38 39 // Shared state between mocked functions and tests 40 // Name: AVRC_IsValidAvcType 41 // Params: uint8_t pdu_id, uint8_t avc_type 42 // Return: bool 43 struct AVRC_IsValidAvcType { 44 static bool return_value; 45 std::function<bool(uint8_t pdu_id, uint8_t avc_type)> body{ 46 [](uint8_t /* pdu_id */, uint8_t /* avc_type */) { 47 return return_value; 48 }}; operatorAVRC_IsValidAvcType49 bool operator()(uint8_t pdu_id, uint8_t avc_type) { 50 return body(pdu_id, avc_type); 51 }; 52 }; 53 extern struct AVRC_IsValidAvcType AVRC_IsValidAvcType; 54 55 // Name: AVRC_IsValidPlayerAttr 56 // Params: uint8_t attr 57 // Return: bool 58 struct AVRC_IsValidPlayerAttr { 59 static bool return_value; 60 std::function<bool(uint8_t attr)> body{ 61 [](uint8_t /* attr */) { return return_value; }}; operatorAVRC_IsValidPlayerAttr62 bool operator()(uint8_t attr) { return body(attr); }; 63 }; 64 extern struct AVRC_IsValidPlayerAttr AVRC_IsValidPlayerAttr; 65 66 // Name: avrc_is_valid_opcode 67 // Params: uint8_t opcode 68 // Return: bool 69 struct avrc_is_valid_opcode { 70 static bool return_value; 71 std::function<bool(uint8_t opcode)> body{ 72 [](uint8_t /* opcode */) { return return_value; }}; operatoravrc_is_valid_opcode73 bool operator()(uint8_t opcode) { return body(opcode); }; 74 }; 75 extern struct avrc_is_valid_opcode avrc_is_valid_opcode; 76 77 // Name: avrc_is_valid_player_attrib_value 78 // Params: uint8_t attrib, uint8_t value 79 // Return: bool 80 struct avrc_is_valid_player_attrib_value { 81 static bool return_value; 82 std::function<bool(uint8_t attrib, uint8_t value)> body{ 83 [](uint8_t /* attrib */, uint8_t /* value */) { return return_value; }}; operatoravrc_is_valid_player_attrib_value84 bool operator()(uint8_t attrib, uint8_t value) { 85 return body(attrib, value); 86 }; 87 }; 88 extern struct avrc_is_valid_player_attrib_value 89 avrc_is_valid_player_attrib_value; 90 91 // Name: avrc_opcode_from_pdu 92 // Params: uint8_t pdu 93 // Return: uint8_t 94 struct avrc_opcode_from_pdu { 95 static uint8_t return_value; 96 std::function<uint8_t(uint8_t pdu)> body{ 97 [](uint8_t /* pdu */) { return return_value; }}; operatoravrc_opcode_from_pdu98 uint8_t operator()(uint8_t pdu) { return body(pdu); }; 99 }; 100 extern struct avrc_opcode_from_pdu avrc_opcode_from_pdu; 101 102 // Name: avrc_pars_pass_thru 103 // Params: tAVRC_MSG_PASS* p_msg, uint16_t* p_vendor_unique_id 104 // Return: tAVRC_STS 105 struct avrc_pars_pass_thru { 106 static tAVRC_STS return_value; 107 std::function<tAVRC_STS(tAVRC_MSG_PASS* p_msg, uint16_t* p_vendor_unique_id)> 108 body{[](tAVRC_MSG_PASS* /* p_msg */, uint16_t* /* p_vendor_unique_id */) { 109 return return_value; 110 }}; operatoravrc_pars_pass_thru111 tAVRC_STS operator()(tAVRC_MSG_PASS* p_msg, uint16_t* p_vendor_unique_id) { 112 return body(p_msg, p_vendor_unique_id); 113 }; 114 }; 115 extern struct avrc_pars_pass_thru avrc_pars_pass_thru; 116 117 } // namespace stack_avrc_utils 118 } // namespace mock 119 } // namespace test 120 121 // END mockcify generation 122