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 #pragma once 17 18 /* 19 * Generated mock file from original source file 20 * Functions generated:5 21 * 22 * mockcify.pl ver 0.6.3 23 */ 24 25 #include <cstdint> 26 #include <functional> 27 28 // Original included files, if any 29 // NOTE: Since this is a mock file with mock definitions some number of 30 // include files may not be required. The include-what-you-use 31 // still applies, but crafting proper inclusion is out of scope 32 // for this effort. This compilation unit may compile as-is, or 33 // may need attention to prune from (or add to ) the inclusion set. 34 35 #include "stack/include/avrc_api.h" 36 #include "types/bluetooth/uuid.h" 37 #include "types/raw_address.h" 38 39 // Original usings 40 using bluetooth::Uuid; 41 using namespace bluetooth::legacy::stack::sdp; 42 43 // Mocked compile conditionals, if any 44 45 namespace test { 46 namespace mock { 47 namespace stack_avrc_sdp { 48 49 // Shared state between mocked functions and tests 50 // Name: AVRC_AddRecord 51 // Params: uint16_t service_uuid, const char* p_service_name, const char* 52 // p_provider_name, uint16_t categories, uint32_t sdp_handle, bool 53 // browse_supported, uint16_t profile_version, uint16_t cover_art_psm Return: 54 // uint16_t 55 struct AVRC_AddRecord { 56 static uint16_t return_value; 57 std::function<uint16_t(uint16_t service_uuid, const char* p_service_name, 58 const char* p_provider_name, uint16_t categories, 59 uint32_t sdp_handle, bool browse_supported, 60 uint16_t profile_version, uint16_t cover_art_psm)> 61 body{[](uint16_t /* service_uuid */, const char* /* p_service_name */, 62 const char* /* p_provider_name */, uint16_t /* categories */, 63 uint32_t /* sdp_handle */, bool /* browse_supported */, 64 uint16_t /* profile_version */, 65 uint16_t /* cover_art_psm */) { return return_value; }}; operatorAVRC_AddRecord66 uint16_t operator()(uint16_t service_uuid, const char* p_service_name, 67 const char* p_provider_name, uint16_t categories, 68 uint32_t sdp_handle, bool browse_supported, 69 uint16_t profile_version, uint16_t cover_art_psm) { 70 return body(service_uuid, p_service_name, p_provider_name, categories, 71 sdp_handle, browse_supported, profile_version, cover_art_psm); 72 }; 73 }; 74 extern struct AVRC_AddRecord AVRC_AddRecord; 75 76 // Name: AVRC_FindService 77 // Params: uint16_t service_uuid, const RawAddress& bd_addr, 78 // tAVRC_SDP_DB_PARAMS* p_db, const tAVRC_FIND_CBACK& find_cback Return: 79 // uint16_t 80 struct AVRC_FindService { 81 static uint16_t return_value; 82 std::function<uint16_t(uint16_t service_uuid, const RawAddress& bd_addr, 83 tAVRC_SDP_DB_PARAMS* p_db, 84 const tAVRC_FIND_CBACK& find_cback)> 85 body{[](uint16_t /* service_uuid */, const RawAddress& /* bd_addr */, 86 tAVRC_SDP_DB_PARAMS* /* p_db */, 87 const tAVRC_FIND_CBACK& /* find_cback */) { 88 return return_value; 89 }}; operatorAVRC_FindService90 uint16_t operator()(uint16_t service_uuid, const RawAddress& bd_addr, 91 tAVRC_SDP_DB_PARAMS* p_db, 92 const tAVRC_FIND_CBACK& find_cback) { 93 return body(service_uuid, bd_addr, p_db, find_cback); 94 }; 95 }; 96 extern struct AVRC_FindService AVRC_FindService; 97 98 // Name: AVRC_Init 99 // Params: void 100 // Return: void 101 struct AVRC_Init { 102 std::function<void(void)> body{[](void) {}}; operatorAVRC_Init103 void operator()(void) { body(); }; 104 }; 105 extern struct AVRC_Init AVRC_Init; 106 107 // Name: AVRC_RemoveRecord 108 // Params: uint32_t sdp_handle 109 // Return: uint16_t 110 struct AVRC_RemoveRecord { 111 static uint16_t return_value; 112 std::function<uint16_t(uint32_t sdp_handle)> body{ 113 [](uint32_t /* sdp_handle */) { return return_value; }}; operatorAVRC_RemoveRecord114 uint16_t operator()(uint32_t sdp_handle) { return body(sdp_handle); }; 115 }; 116 extern struct AVRC_RemoveRecord AVRC_RemoveRecord; 117 118 } // namespace stack_avrc_sdp 119 } // namespace mock 120 } // namespace test 121 122 // END mockcify generation 123