• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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:4
21  *
22  *  mockcify.pl ver 0.5.0
23  */
24 
25 #include <cstdint>
26 #include <functional>
27 #include <map>
28 #include <string>
29 
30 // Original included files, if any
31 // NOTE: Since this is a mock file with mock definitions some number of
32 //       include files may not be required.  The include-what-you-use
33 //       still applies, but crafting proper inclusion is out of scope
34 //       for this effort.  This compilation unit may compile as-is, or
35 //       may need attention to prune from (or add to ) the inclusion set.
36 #include <base/logging.h>
37 #include <string.h>
38 
39 #include "avrc_api.h"
40 #include "osi/include/allocator.h"
41 #include "stack/avrc/avrc_int.h"
42 #include "stack/include/bt_hdr.h"
43 #include "test/common/mock_functions.h"
44 
45 // Original usings
46 
47 // Mocked compile conditionals, if any
48 
49 namespace test {
50 namespace mock {
51 namespace stack_avrc_apt {
52 
53 // Shared state between mocked functions and tests
54 // Name: AVRC_SubCmd
55 // Params: uint8_t handle, uint8_t label, uint8_t page
56 // Return: uint16_t
57 struct AVRC_SubCmd {
58   static uint16_t return_value;
59   std::function<uint16_t(uint8_t handle, uint8_t label, uint8_t page)> body{
60       [](uint8_t handle, uint8_t label, uint8_t page) { return return_value; }};
operatorAVRC_SubCmd61   uint16_t operator()(uint8_t handle, uint8_t label, uint8_t page) {
62     return body(handle, label, page);
63   };
64 };
65 extern struct AVRC_SubCmd AVRC_SubCmd;
66 
67 // Name: AVRC_UnitCmd
68 // Params: uint8_t handle, uint8_t label
69 // Return: uint16_t
70 struct AVRC_UnitCmd {
71   static uint16_t return_value;
72   std::function<uint16_t(uint8_t handle, uint8_t label)> body{
73       [](uint8_t handle, uint8_t label) { return return_value; }};
operatorAVRC_UnitCmd74   uint16_t operator()(uint8_t handle, uint8_t label) {
75     return body(handle, label);
76   };
77 };
78 extern struct AVRC_UnitCmd AVRC_UnitCmd;
79 
80 // Name: AVRC_VendorCmd
81 // Params: uint8_t handle, uint8_t label, tAVRC_MSG_VENDOR* p_msg
82 // Return: uint16_t
83 struct AVRC_VendorCmd {
84   static uint16_t return_value;
85   std::function<uint16_t(uint8_t handle, uint8_t label,
86                          tAVRC_MSG_VENDOR* p_msg)>
87       body{[](uint8_t handle, uint8_t label, tAVRC_MSG_VENDOR* p_msg) {
88         return return_value;
89       }};
operatorAVRC_VendorCmd90   uint16_t operator()(uint8_t handle, uint8_t label, tAVRC_MSG_VENDOR* p_msg) {
91     return body(handle, label, p_msg);
92   };
93 };
94 extern struct AVRC_VendorCmd AVRC_VendorCmd;
95 
96 // Name: AVRC_VendorRsp
97 // Params: uint8_t handle, uint8_t label, tAVRC_MSG_VENDOR* p_msg
98 // Return: uint16_t
99 struct AVRC_VendorRsp {
100   static uint16_t return_value;
101   std::function<uint16_t(uint8_t handle, uint8_t label,
102                          tAVRC_MSG_VENDOR* p_msg)>
103       body{[](uint8_t handle, uint8_t label, tAVRC_MSG_VENDOR* p_msg) {
104         return return_value;
105       }};
operatorAVRC_VendorRsp106   uint16_t operator()(uint8_t handle, uint8_t label, tAVRC_MSG_VENDOR* p_msg) {
107     return body(handle, label, p_msg);
108   };
109 };
110 extern struct AVRC_VendorRsp AVRC_VendorRsp;
111 
112 }  // namespace stack_avrc_apt
113 }  // namespace mock
114 }  // namespace test
115 
116 // END mockcify generation
117