• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Automatic generation of D-Bus interface mock proxies for:
2 //  - org.chromium.PowerManager
3 #ifndef ____CHROMEOS_DBUS_BINDING____________________BUILD_LINK_TMP_PORTAGE_CHROMEOS_BASE_POWER_MANAGER_9999_WORK_BUILD_OUT_DEFAULT_GEN_INCLUDE_POWER_MANAGER_DBUS_PROXY_MOCKS_H
4 #define ____CHROMEOS_DBUS_BINDING____________________BUILD_LINK_TMP_PORTAGE_CHROMEOS_BASE_POWER_MANAGER_9999_WORK_BUILD_OUT_DEFAULT_GEN_INCLUDE_POWER_MANAGER_DBUS_PROXY_MOCKS_H
5 #include <string>
6 #include <vector>
7 
8 #include <base/callback_forward.h>
9 #include <base/logging.h>
10 #include <base/macros.h>
11 #include <brillo/any.h>
12 #include <brillo/errors/error.h>
13 #include <brillo/variant_dictionary.h>
14 #include <gmock/gmock.h>
15 
16 #include "power_manager/dbus-proxies.h"
17 
18 namespace org {
19 namespace chromium {
20 
21 // Mock object for PowerManagerProxyInterface.
22 class PowerManagerProxyMock : public PowerManagerProxyInterface {
23  public:
24   PowerManagerProxyMock() = default;
25 
26   MOCK_METHOD2(RequestShutdown,
27                bool(brillo::ErrorPtr* /*error*/,
28                     int /*timeout_ms*/));
29   MOCK_METHOD3(RequestShutdownAsync,
30                void(const base::Callback<void()>& /*success_callback*/,
31                     const base::Callback<void(brillo::Error*)>& /*error_callback*/,
32                     int /*timeout_ms*/));
33   MOCK_METHOD3(RequestRestart,
34                bool(int32_t /*in_reason*/,
35                     brillo::ErrorPtr* /*error*/,
36                     int /*timeout_ms*/));
37   MOCK_METHOD4(RequestRestartAsync,
38                void(int32_t /*in_reason*/,
39                     const base::Callback<void()>& /*success_callback*/,
40                     const base::Callback<void(brillo::Error*)>& /*error_callback*/,
41                     int /*timeout_ms*/));
42   MOCK_METHOD3(RequestSuspend,
43                bool(uint64_t /*in_external_wakeup_count*/,
44                     brillo::ErrorPtr* /*error*/,
45                     int /*timeout_ms*/));
46   MOCK_METHOD4(RequestSuspendAsync,
47                void(uint64_t /*in_external_wakeup_count*/,
48                     const base::Callback<void()>& /*success_callback*/,
49                     const base::Callback<void(brillo::Error*)>& /*error_callback*/,
50                     int /*timeout_ms*/));
51   MOCK_METHOD3(DecreaseScreenBrightness,
52                bool(bool /*in_allow_off*/,
53                     brillo::ErrorPtr* /*error*/,
54                     int /*timeout_ms*/));
55   MOCK_METHOD4(DecreaseScreenBrightnessAsync,
56                void(bool /*in_allow_off*/,
57                     const base::Callback<void()>& /*success_callback*/,
58                     const base::Callback<void(brillo::Error*)>& /*error_callback*/,
59                     int /*timeout_ms*/));
60   MOCK_METHOD2(IncreaseScreenBrightness,
61                bool(brillo::ErrorPtr* /*error*/,
62                     int /*timeout_ms*/));
63   MOCK_METHOD3(IncreaseScreenBrightnessAsync,
64                void(const base::Callback<void()>& /*success_callback*/,
65                     const base::Callback<void(brillo::Error*)>& /*error_callback*/,
66                     int /*timeout_ms*/));
67   MOCK_METHOD3(GetScreenBrightnessPercent,
68                bool(double* /*out_percent*/,
69                     brillo::ErrorPtr* /*error*/,
70                     int /*timeout_ms*/));
71   MOCK_METHOD3(GetScreenBrightnessPercentAsync,
72                void(const base::Callback<void(double /*percent*/)>& /*success_callback*/,
73                     const base::Callback<void(brillo::Error*)>& /*error_callback*/,
74                     int /*timeout_ms*/));
75   MOCK_METHOD4(SetScreenBrightnessPercent,
76                bool(double /*in_percent*/,
77                     int32_t /*in_style*/,
78                     brillo::ErrorPtr* /*error*/,
79                     int /*timeout_ms*/));
80   MOCK_METHOD5(SetScreenBrightnessPercentAsync,
81                void(double /*in_percent*/,
82                     int32_t /*in_style*/,
83                     const base::Callback<void()>& /*success_callback*/,
84                     const base::Callback<void(brillo::Error*)>& /*error_callback*/,
85                     int /*timeout_ms*/));
86   MOCK_METHOD2(DecreaseKeyboardBrightness,
87                bool(brillo::ErrorPtr* /*error*/,
88                     int /*timeout_ms*/));
89   MOCK_METHOD3(DecreaseKeyboardBrightnessAsync,
90                void(const base::Callback<void()>& /*success_callback*/,
91                     const base::Callback<void(brillo::Error*)>& /*error_callback*/,
92                     int /*timeout_ms*/));
93   MOCK_METHOD2(IncreaseKeyboardBrightness,
94                bool(brillo::ErrorPtr* /*error*/,
95                     int /*timeout_ms*/));
96   MOCK_METHOD3(IncreaseKeyboardBrightnessAsync,
97                void(const base::Callback<void()>& /*success_callback*/,
98                     const base::Callback<void(brillo::Error*)>& /*error_callback*/,
99                     int /*timeout_ms*/));
100   MOCK_METHOD3(GetPowerSupplyProperties,
101                bool(std::vector<uint8_t>* /*out_serialized_proto*/,
102                     brillo::ErrorPtr* /*error*/,
103                     int /*timeout_ms*/));
104   MOCK_METHOD3(GetPowerSupplyPropertiesAsync,
105                void(const base::Callback<void(const std::vector<uint8_t>& /*serialized_proto*/)>& /*success_callback*/,
106                     const base::Callback<void(brillo::Error*)>& /*error_callback*/,
107                     int /*timeout_ms*/));
108   MOCK_METHOD3(HandleVideoActivity,
109                bool(bool /*in_fullscreen*/,
110                     brillo::ErrorPtr* /*error*/,
111                     int /*timeout_ms*/));
112   MOCK_METHOD4(HandleVideoActivityAsync,
113                void(bool /*in_fullscreen*/,
114                     const base::Callback<void()>& /*success_callback*/,
115                     const base::Callback<void(brillo::Error*)>& /*error_callback*/,
116                     int /*timeout_ms*/));
117   MOCK_METHOD3(HandleUserActivity,
118                bool(int32_t /*in_type*/,
119                     brillo::ErrorPtr* /*error*/,
120                     int /*timeout_ms*/));
121   MOCK_METHOD4(HandleUserActivityAsync,
122                void(int32_t /*in_type*/,
123                     const base::Callback<void()>& /*success_callback*/,
124                     const base::Callback<void(brillo::Error*)>& /*error_callback*/,
125                     int /*timeout_ms*/));
126   MOCK_METHOD3(SetIsProjecting,
127                bool(bool /*in_is_projecting*/,
128                     brillo::ErrorPtr* /*error*/,
129                     int /*timeout_ms*/));
130   MOCK_METHOD4(SetIsProjectingAsync,
131                void(bool /*in_is_projecting*/,
132                     const base::Callback<void()>& /*success_callback*/,
133                     const base::Callback<void(brillo::Error*)>& /*error_callback*/,
134                     int /*timeout_ms*/));
135   MOCK_METHOD3(SetPolicy,
136                bool(const std::vector<uint8_t>& /*in_serialized_proto*/,
137                     brillo::ErrorPtr* /*error*/,
138                     int /*timeout_ms*/));
139   MOCK_METHOD4(SetPolicyAsync,
140                void(const std::vector<uint8_t>& /*in_serialized_proto*/,
141                     const base::Callback<void()>& /*success_callback*/,
142                     const base::Callback<void(brillo::Error*)>& /*error_callback*/,
143                     int /*timeout_ms*/));
144   MOCK_METHOD3(SetPowerSource,
145                bool(const std::string& /*in_id*/,
146                     brillo::ErrorPtr* /*error*/,
147                     int /*timeout_ms*/));
148   MOCK_METHOD4(SetPowerSourceAsync,
149                void(const std::string& /*in_id*/,
150                     const base::Callback<void()>& /*success_callback*/,
151                     const base::Callback<void(brillo::Error*)>& /*error_callback*/,
152                     int /*timeout_ms*/));
153   MOCK_METHOD3(HandlePowerButtonAcknowledgment,
154                bool(int64_t /*in_timestamp_internal*/,
155                     brillo::ErrorPtr* /*error*/,
156                     int /*timeout_ms*/));
157   MOCK_METHOD4(HandlePowerButtonAcknowledgmentAsync,
158                void(int64_t /*in_timestamp_internal*/,
159                     const base::Callback<void()>& /*success_callback*/,
160                     const base::Callback<void(brillo::Error*)>& /*error_callback*/,
161                     int /*timeout_ms*/));
162   MOCK_METHOD4(RegisterSuspendDelay,
163                bool(const std::vector<uint8_t>& /*in_serialized_request_proto*/,
164                     std::vector<uint8_t>* /*out_serialized_reply_proto*/,
165                     brillo::ErrorPtr* /*error*/,
166                     int /*timeout_ms*/));
167   MOCK_METHOD4(RegisterSuspendDelayAsync,
168                void(const std::vector<uint8_t>& /*in_serialized_request_proto*/,
169                     const base::Callback<void(const std::vector<uint8_t>& /*serialized_reply_proto*/)>& /*success_callback*/,
170                     const base::Callback<void(brillo::Error*)>& /*error_callback*/,
171                     int /*timeout_ms*/));
172   MOCK_METHOD3(UnregisterSuspendDelay,
173                bool(const std::vector<uint8_t>& /*in_serialized_proto*/,
174                     brillo::ErrorPtr* /*error*/,
175                     int /*timeout_ms*/));
176   MOCK_METHOD4(UnregisterSuspendDelayAsync,
177                void(const std::vector<uint8_t>& /*in_serialized_proto*/,
178                     const base::Callback<void()>& /*success_callback*/,
179                     const base::Callback<void(brillo::Error*)>& /*error_callback*/,
180                     int /*timeout_ms*/));
181   MOCK_METHOD3(HandleSuspendReadiness,
182                bool(const std::vector<uint8_t>& /*in_serialized_proto*/,
183                     brillo::ErrorPtr* /*error*/,
184                     int /*timeout_ms*/));
185   MOCK_METHOD4(HandleSuspendReadinessAsync,
186                void(const std::vector<uint8_t>& /*in_serialized_proto*/,
187                     const base::Callback<void()>& /*success_callback*/,
188                     const base::Callback<void(brillo::Error*)>& /*error_callback*/,
189                     int /*timeout_ms*/));
190   MOCK_METHOD4(RegisterDarkSuspendDelay,
191                bool(const std::vector<uint8_t>& /*in_serialized_request_proto*/,
192                     std::vector<uint8_t>* /*out_serialized_reply_proto*/,
193                     brillo::ErrorPtr* /*error*/,
194                     int /*timeout_ms*/));
195   MOCK_METHOD4(RegisterDarkSuspendDelayAsync,
196                void(const std::vector<uint8_t>& /*in_serialized_request_proto*/,
197                     const base::Callback<void(const std::vector<uint8_t>& /*serialized_reply_proto*/)>& /*success_callback*/,
198                     const base::Callback<void(brillo::Error*)>& /*error_callback*/,
199                     int /*timeout_ms*/));
200   MOCK_METHOD3(UnregisterDarkSuspendDelay,
201                bool(const std::vector<uint8_t>& /*in_serialized_proto*/,
202                     brillo::ErrorPtr* /*error*/,
203                     int /*timeout_ms*/));
204   MOCK_METHOD4(UnregisterDarkSuspendDelayAsync,
205                void(const std::vector<uint8_t>& /*in_serialized_proto*/,
206                     const base::Callback<void()>& /*success_callback*/,
207                     const base::Callback<void(brillo::Error*)>& /*error_callback*/,
208                     int /*timeout_ms*/));
209   MOCK_METHOD3(HandleDarkSuspendReadiness,
210                bool(const std::vector<uint8_t>& /*in_serialized_proto*/,
211                     brillo::ErrorPtr* /*error*/,
212                     int /*timeout_ms*/));
213   MOCK_METHOD4(HandleDarkSuspendReadinessAsync,
214                void(const std::vector<uint8_t>& /*in_serialized_proto*/,
215                     const base::Callback<void()>& /*success_callback*/,
216                     const base::Callback<void(brillo::Error*)>& /*error_callback*/,
217                     int /*timeout_ms*/));
218   MOCK_METHOD3(RecordDarkResumeWakeReason,
219                bool(const std::vector<uint8_t>& /*in_serialized_proto*/,
220                     brillo::ErrorPtr* /*error*/,
221                     int /*timeout_ms*/));
222   MOCK_METHOD4(RecordDarkResumeWakeReasonAsync,
223                void(const std::vector<uint8_t>& /*in_serialized_proto*/,
224                     const base::Callback<void()>& /*success_callback*/,
225                     const base::Callback<void(brillo::Error*)>& /*error_callback*/,
226                     int /*timeout_ms*/));
227   MOCK_METHOD2(RegisterBrightnessChangedSignalHandler,
228                void(const base::Callback<void(int32_t,
229                                               bool)>& /*signal_callback*/,
230                     dbus::ObjectProxy::OnConnectedCallback /*on_connected_callback*/));
231   MOCK_METHOD2(RegisterKeyboardBrightnessChangedSignalHandler,
232                void(const base::Callback<void(int32_t,
233                                               bool)>& /*signal_callback*/,
234                     dbus::ObjectProxy::OnConnectedCallback /*on_connected_callback*/));
235   MOCK_METHOD2(RegisterPeripheralBatteryStatusSignalHandler,
236                void(const base::Callback<void(const std::vector<uint8_t>&)>& /*signal_callback*/,
237                     dbus::ObjectProxy::OnConnectedCallback /*on_connected_callback*/));
238   MOCK_METHOD2(RegisterPowerSupplyPollSignalHandler,
239                void(const base::Callback<void(const std::vector<uint8_t>&)>& /*signal_callback*/,
240                     dbus::ObjectProxy::OnConnectedCallback /*on_connected_callback*/));
241   MOCK_METHOD2(RegisterSuspendImminentSignalHandler,
242                void(const base::Callback<void(const std::vector<uint8_t>&)>& /*signal_callback*/,
243                     dbus::ObjectProxy::OnConnectedCallback /*on_connected_callback*/));
244   MOCK_METHOD2(RegisterSuspendDoneSignalHandler,
245                void(const base::Callback<void(const std::vector<uint8_t>&)>& /*signal_callback*/,
246                     dbus::ObjectProxy::OnConnectedCallback /*on_connected_callback*/));
247   MOCK_METHOD2(RegisterDarkSuspendImminentSignalHandler,
248                void(const base::Callback<void(const std::vector<uint8_t>&)>& /*signal_callback*/,
249                     dbus::ObjectProxy::OnConnectedCallback /*on_connected_callback*/));
250   MOCK_METHOD2(RegisterInputEventSignalHandler,
251                void(const base::Callback<void(const std::vector<uint8_t>&)>& /*signal_callback*/,
252                     dbus::ObjectProxy::OnConnectedCallback /*on_connected_callback*/));
253   MOCK_METHOD2(RegisterIdleActionImminentSignalHandler,
254                void(const base::Callback<void(const std::vector<uint8_t>&)>& /*signal_callback*/,
255                     dbus::ObjectProxy::OnConnectedCallback /*on_connected_callback*/));
256   MOCK_METHOD2(RegisterIdleActionDeferredSignalHandler,
257                void(const base::Closure& /*signal_callback*/,
258                     dbus::ObjectProxy::OnConnectedCallback /*on_connected_callback*/));
259 
260  private:
261   DISALLOW_COPY_AND_ASSIGN(PowerManagerProxyMock);
262 };
263 }  // namespace chromium
264 }  // namespace org
265 
266 #endif  // ____CHROMEOS_DBUS_BINDING____________________BUILD_LINK_TMP_PORTAGE_CHROMEOS_BASE_POWER_MANAGER_9999_WORK_BUILD_OUT_DEFAULT_GEN_INCLUDE_POWER_MANAGER_DBUS_PROXY_MOCKS_H
267