1 /*
2  * Copyright 2021 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 /*
18  * Generated mock file from original source file
19  *   Functions generated:10
20  *
21  *  mockcify.pl ver 0.3.0
22  */
23 
24 #include <cstdint>
25 #include <functional>
26 
27 // Original included files, if any
28 #include "bta/sys/bta_sys.h"
29 #include "osi/include/alarm.h"
30 
31 // Mocked compile conditionals, if any
32 
33 namespace test {
34 namespace mock {
35 namespace bta_sys_main {
36 
37 // Name: bta_sys_deregister
38 // Params: uint8_t id
39 // Return: void
40 struct bta_sys_deregister {
41   std::function<void(uint8_t id)> body{[](uint8_t /* id */) {}};
operatorbta_sys_deregister42   void operator()(uint8_t id) { body(id); }
43 };
44 extern struct bta_sys_deregister bta_sys_deregister;
45 
46 // Name: bta_sys_disable
47 // Params:
48 // Return: void
49 struct bta_sys_disable {
50   std::function<void()> body{[]() {}};
operatorbta_sys_disable51   void operator()() { body(); }
52 };
53 extern struct bta_sys_disable bta_sys_disable;
54 
55 // Name: bta_sys_init
56 // Params: void
57 // Return: void
58 struct bta_sys_init {
59   std::function<void(void)> body{[](void) {}};
operatorbta_sys_init60   void operator()(void) { body(); }
61 };
62 extern struct bta_sys_init bta_sys_init;
63 
64 // Name: bta_sys_is_register
65 // Params: uint8_t id
66 // Return: bool
67 struct bta_sys_is_register {
68   bool return_value{false};
69   std::function<bool(uint8_t id)> body{[this](uint8_t /* id */) { return return_value; }};
operatorbta_sys_is_register70   bool operator()(uint8_t id) { return body(id); }
71 };
72 extern struct bta_sys_is_register bta_sys_is_register;
73 
74 // Name: bta_sys_register
75 // Params: uint8_t id, const tBTA_SYS_REG* p_reg
76 // Return: void
77 struct bta_sys_register {
78   std::function<void(uint8_t id, const tBTA_SYS_REG* p_reg)> body{
79           [](uint8_t /* id */, const tBTA_SYS_REG* /* p_reg */) {}};
operatorbta_sys_register80   void operator()(uint8_t id, const tBTA_SYS_REG* p_reg) { body(id, p_reg); }
81 };
82 extern struct bta_sys_register bta_sys_register;
83 
84 // Name: bta_sys_sendmsg
85 // Params: void* p_msg
86 // Return: void
87 struct bta_sys_sendmsg {
88   std::function<void(void* p_msg)> body{[](void* /* p_msg */) {}};
operatorbta_sys_sendmsg89   void operator()(void* p_msg) { body(p_msg); }
90 };
91 extern struct bta_sys_sendmsg bta_sys_sendmsg;
92 
93 // Name: bta_sys_sendmsg_delayed
94 // Params: void* p_msg, std::chrono::microseconds delay
95 // Return: void
96 struct bta_sys_sendmsg_delayed {
97   std::function<void(void* p_msg, std::chrono::microseconds delay)> body{
98           [](void* /* p_msg */, std::chrono::microseconds /* delay */) {}};
operatorbta_sys_sendmsg_delayed99   void operator()(void* p_msg, std::chrono::microseconds delay) { body(p_msg, delay); }
100 };
101 extern struct bta_sys_sendmsg_delayed bta_sys_sendmsg_delayed;
102 
103 // Name: bta_sys_start_timer
104 // Params: alarm_t* alarm, uint64_t interval_ms, uint16_t event, uint16_t
105 // layer_specific Return: void
106 struct bta_sys_start_timer {
107   std::function<void(alarm_t* alarm, uint64_t interval_ms, uint16_t event, uint16_t layer_specific)>
108           body{[](alarm_t* /* alarm */, uint64_t /* interval_ms */, uint16_t /* event */,
109                   uint16_t /* layer_specific */) {}};
operatorbta_sys_start_timer110   void operator()(alarm_t* alarm, uint64_t interval_ms, uint16_t event, uint16_t layer_specific) {
111     body(alarm, interval_ms, event, layer_specific);
112   }
113 };
114 extern struct bta_sys_start_timer bta_sys_start_timer;
115 
116 }  // namespace bta_sys_main
117 }  // namespace mock
118 }  // namespace test
119 
120 // END mockcify generation
121