• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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:6
20  *
21  *  mockcify.pl ver 0.3.0
22  */
23 
24 #include <functional>
25 
26 #include "include/hardware/bluetooth.h"
27 
28 // Original included files, if any
29 // #include "osi/include/wakelock.h"
30 
31 // Mocked compile conditionals, if any
32 
33 namespace test {
34 namespace mock {
35 namespace osi_wakelock {
36 
37 // Shared state between mocked functions and tests
38 // Name: wakelock_acquire
39 // Params: void
40 // Return: bool
41 struct wakelock_acquire {
42   bool return_value{false};
43   std::function<bool(void)> body{[this](void) { return return_value; }};
operatorwakelock_acquire44   bool operator()(void) { return body(); };
45 };
46 extern struct wakelock_acquire wakelock_acquire;
47 
48 // Name: wakelock_cleanup
49 // Params: void
50 // Return: void
51 struct wakelock_cleanup {
52   std::function<void(void)> body{[](void) {}};
operatorwakelock_cleanup53   void operator()(void) { body(); };
54 };
55 extern struct wakelock_cleanup wakelock_cleanup;
56 
57 // Name: wakelock_debug_dump
58 // Params: int fd
59 // Return: void
60 struct wakelock_debug_dump {
61   std::function<void(int fd)> body{[](int /* fd */) {}};
operatorwakelock_debug_dump62   void operator()(int fd) { body(fd); };
63 };
64 extern struct wakelock_debug_dump wakelock_debug_dump;
65 
66 // Name: wakelock_release
67 // Params: void
68 // Return: bool
69 struct wakelock_release {
70   bool return_value{false};
71   std::function<bool(void)> body{[this](void) { return return_value; }};
operatorwakelock_release72   bool operator()(void) { return body(); };
73 };
74 extern struct wakelock_release wakelock_release;
75 
76 // Name: wakelock_set_os_callouts
77 // Params: bt_os_callouts_t* callouts
78 // Return: void
79 struct wakelock_set_os_callouts {
80   std::function<void(bt_os_callouts_t* callouts)> body{
81       [](bt_os_callouts_t* /* callouts */) {}};
operatorwakelock_set_os_callouts82   void operator()(bt_os_callouts_t* callouts) { body(callouts); };
83 };
84 extern struct wakelock_set_os_callouts wakelock_set_os_callouts;
85 
86 // Name: wakelock_set_paths
87 // Params: const char* lock_path, const char* unlock_path
88 // Return: void
89 struct wakelock_set_paths {
90   std::function<void(const char* lock_path, const char* unlock_path)> body{
91       [](const char* /* lock_path */, const char* /* unlock_path */) {}};
operatorwakelock_set_paths92   void operator()(const char* lock_path, const char* unlock_path) {
93     body(lock_path, unlock_path);
94   };
95 };
96 extern struct wakelock_set_paths wakelock_set_paths;
97 
98 }  // namespace osi_wakelock
99 }  // namespace mock
100 }  // namespace test
101 
102 // END mockcify generation
103