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)> body{
43           [this](const char* /* key */, char* /* value */, const char* /* default_value */) {
44             return return_value;
45           }};
operatorosi_property_get46   int operator()(const char* key, char* value, const char* default_value) {
47     return body(key, value, default_value);
48   }
49 };
50 extern struct osi_property_get osi_property_get;
51 
52 // Name: osi_property_get_bool
53 // Params: const char* key, bool default_value
54 // Return: bool
55 struct osi_property_get_bool {
56   bool return_value{false};
57   std::function<bool(const char* key, bool default_value)> body{
58           [this](const char* /* key */, bool /* default_value */) { return return_value; }};
operatorosi_property_get_bool59   bool operator()(const char* key, bool default_value) { return body(key, default_value); }
60 };
61 extern struct osi_property_get_bool osi_property_get_bool;
62 
63 // Name: osi_property_get_int32
64 // Params: const char* key, int32_t default_value
65 // Return: int32_t
66 struct osi_property_get_int32 {
67   int32_t return_value{0};
68   std::function<int32_t(const char* key, int32_t default_value)> body{
69           [this](const char* /* key */, int32_t /* default_value */) { return return_value; }};
operatorosi_property_get_int3270   int32_t operator()(const char* key, int32_t default_value) { return body(key, default_value); }
71 };
72 extern struct osi_property_get_int32 osi_property_get_int32;
73 
74 // Name: osi_property_set
75 // Params: const char* key, const char* value
76 // Return: int
77 struct osi_property_set {
78   int return_value{0};
79   std::function<int(const char* key, const char* value)> body{
80           [this](const char* /* key */, const char* /* value */) { return return_value; }};
operatorosi_property_set81   int operator()(const char* key, const char* value) { return body(key, value); }
82 };
83 extern struct osi_property_set osi_property_set;
84 
85 }  // namespace osi_properties
86 }  // namespace mock
87 }  // namespace test
88 
89 // END mockcify generation
90