• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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:5
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_stack_avrc_sdp.h"
25 
26 #include <cstdint>
27 
28 #include "test/common/mock_functions.h"
29 
30 // Original usings
31 using bluetooth::Uuid;
32 
33 // Mocked internal structures, if any
34 
35 namespace test {
36 namespace mock {
37 namespace stack_avrc_sdp {
38 
39 // Function state capture and return values, if needed
40 struct AVRC_AddRecord AVRC_AddRecord;
41 struct AVRC_FindService AVRC_FindService;
42 struct AVRC_Init AVRC_Init;
43 struct AVRC_RemoveRecord AVRC_RemoveRecord;
44 
45 }  // namespace stack_avrc_sdp
46 }  // namespace mock
47 }  // namespace test
48 
49 // Mocked function return values, if any
50 namespace test {
51 namespace mock {
52 namespace stack_avrc_sdp {
53 
54 uint16_t AVRC_AddRecord::return_value = 0;
55 uint16_t AVRC_FindService::return_value = 0;
56 uint16_t AVRC_RemoveRecord::return_value = 0;
57 
58 }  // namespace stack_avrc_sdp
59 }  // namespace mock
60 }  // namespace test
61 
62 // Mocked functions, if any
AVRC_AddRecord(uint16_t service_uuid,const char * p_service_name,const char * p_provider_name,uint16_t categories,uint32_t sdp_handle,bool browse_supported,uint16_t profile_version,uint16_t cover_art_psm)63 uint16_t AVRC_AddRecord(uint16_t service_uuid, const char* p_service_name,
64                         const char* p_provider_name, uint16_t categories, uint32_t sdp_handle,
65                         bool browse_supported, uint16_t profile_version, uint16_t cover_art_psm) {
66   inc_func_call_count(__func__);
67   return test::mock::stack_avrc_sdp::AVRC_AddRecord(service_uuid, p_service_name, p_provider_name,
68                                                     categories, sdp_handle, browse_supported,
69                                                     profile_version, cover_art_psm);
70 }
AVRC_FindService(uint16_t service_uuid,const RawAddress & bd_addr,tAVRC_SDP_DB_PARAMS * p_db,const tAVRC_FIND_CBACK & find_cback)71 uint16_t AVRC_FindService(uint16_t service_uuid, const RawAddress& bd_addr,
72                           tAVRC_SDP_DB_PARAMS* p_db, const tAVRC_FIND_CBACK& find_cback) {
73   inc_func_call_count(__func__);
74   return test::mock::stack_avrc_sdp::AVRC_FindService(service_uuid, bd_addr, p_db, find_cback);
75 }
AVRC_Init(void)76 void AVRC_Init(void) {
77   inc_func_call_count(__func__);
78   test::mock::stack_avrc_sdp::AVRC_Init();
79 }
AVRC_RemoveRecord(uint32_t sdp_handle)80 uint16_t AVRC_RemoveRecord(uint32_t sdp_handle) {
81   inc_func_call_count(__func__);
82   return test::mock::stack_avrc_sdp::AVRC_RemoveRecord(sdp_handle);
83 }
84 // Mocked functions complete
85 // END mockcify generation
86