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:4
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 <cutils/properties.h>
29 
30 // Mocked compile conditionals, if any
31 
32 namespace test {
33 namespace mock {
34 namespace osi_properties {
35 
36 // Shared state between mocked functions and tests
37 // Name: osi_property_get
38 // Params: const char* key, char* value, const char* default_value
39 // Return: int
40 struct osi_property_get {
41   int return_value{0};
42   std::function<int(const char* key, char* value, const char* default_value)>
43       body{[this](const char* /* key */, char* /* value */,
44                   const char* /* default_value */) { return return_value; }};
operatorosi_property_get45   int operator()(const char* key, char* value, const char* default_value) {
46     return body(key, value, default_value);
47   };
48 };
49 extern struct osi_property_get osi_property_get;
50 
51 // Name: osi_property_get_bool
52 // Params: const char* key, bool default_value
53 // Return: bool
54 struct osi_property_get_bool {
55   bool return_value{false};
56   std::function<bool(const char* key, bool default_value)> body{
57       [this](const char* /* key */, bool /* default_value */) {
58         return return_value;
59       }};
operatorosi_property_get_bool60   bool operator()(const char* key, bool default_value) {
61     return body(key, default_value);
62   };
63 };
64 extern struct osi_property_get_bool osi_property_get_bool;
65 
66 // Name: osi_property_get_int32
67 // Params: const char* key, int32_t default_value
68 // Return: int32_t
69 struct osi_property_get_int32 {
70   int32_t return_value{0};
71   std::function<int32_t(const char* key, int32_t default_value)> body{
72       [this](const char* /* key */, int32_t /* default_value */) {
73         return return_value;
74       }};
operatorosi_property_get_int3275   int32_t operator()(const char* key, int32_t default_value) {
76     return body(key, default_value);
77   };
78 };
79 extern struct osi_property_get_int32 osi_property_get_int32;
80 
81 // Name: osi_property_set
82 // Params: const char* key, const char* value
83 // Return: int
84 struct osi_property_set {
85   int return_value{0};
86   std::function<int(const char* key, const char* value)> body{
87       [this](const char* /* key */, const char* /* value */) {
88         return return_value;
89       }};
operatorosi_property_set90   int operator()(const char* key, const char* value) {
91     return body(key, value);
92   };
93 };
94 extern struct osi_property_set osi_property_set;
95 
96 }  // namespace osi_properties
97 }  // namespace mock
98 }  // namespace test
99 
100 // END mockcify generation
101