blob: 2b6ce4dc345c912cae0e813e0e122399a796f95c [file] [log] [blame]
Alex Deymod5561a52015-09-03 23:17:52 -07001// Automatic generation of D-Bus interface mock proxies for:
2// - org.chromium.SessionManagerInterface
3#ifndef ____CHROMEOS_DBUS_BINDING____________________BUILD_LINK_VAR_CACHE_PORTAGE_CHROMEOS_BASE_CHROMEOS_LOGIN_OUT_DEFAULT_GEN_INCLUDE_SESSION_MANAGER_DBUS_PROXY_MOCKS_H
4#define ____CHROMEOS_DBUS_BINDING____________________BUILD_LINK_VAR_CACHE_PORTAGE_CHROMEOS_BASE_CHROMEOS_LOGIN_OUT_DEFAULT_GEN_INCLUDE_SESSION_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>
Alex Vakulenko3f39d5c2015-10-13 09:27:13 -070011#include <brillo/any.h>
12#include <brillo/errors/error.h>
13#include <brillo/variant_dictionary.h>
Alex Deymod5561a52015-09-03 23:17:52 -070014#include <gmock/gmock.h>
15
16#include "session_manager/dbus-proxies.h"
17
18namespace org {
19namespace chromium {
20
21// Mock object for SessionManagerInterfaceProxyInterface.
22class SessionManagerInterfaceProxyMock : public SessionManagerInterfaceProxyInterface {
23 public:
24 SessionManagerInterfaceProxyMock() = default;
25
26 MOCK_METHOD2(EmitLoginPromptVisible,
Alex Vakulenko3f39d5c2015-10-13 09:27:13 -070027 bool(brillo::ErrorPtr* /*error*/,
Alex Deymod5561a52015-09-03 23:17:52 -070028 int /*timeout_ms*/));
29 MOCK_METHOD3(EmitLoginPromptVisibleAsync,
30 void(const base::Callback<void()>& /*success_callback*/,
Alex Vakulenko3f39d5c2015-10-13 09:27:13 -070031 const base::Callback<void(brillo::Error*)>& /*error_callback*/,
Alex Deymod5561a52015-09-03 23:17:52 -070032 int /*timeout_ms*/));
33 MOCK_METHOD5(EnableChromeTesting,
34 bool(bool /*in_force_relaunch*/,
35 const std::vector<std::string>& /*in_extra_arguments*/,
36 std::string* /*out_filepath*/,
Alex Vakulenko3f39d5c2015-10-13 09:27:13 -070037 brillo::ErrorPtr* /*error*/,
Alex Deymod5561a52015-09-03 23:17:52 -070038 int /*timeout_ms*/));
39 MOCK_METHOD5(EnableChromeTestingAsync,
40 void(bool /*in_force_relaunch*/,
41 const std::vector<std::string>& /*in_extra_arguments*/,
42 const base::Callback<void(const std::string& /*filepath*/)>& /*success_callback*/,
Alex Vakulenko3f39d5c2015-10-13 09:27:13 -070043 const base::Callback<void(brillo::Error*)>& /*error_callback*/,
Alex Deymod5561a52015-09-03 23:17:52 -070044 int /*timeout_ms*/));
45 MOCK_METHOD5(StartSession,
46 bool(const std::string& /*in_email_address*/,
47 const std::string& /*in_unique_identifier*/,
48 bool* /*out_done*/,
Alex Vakulenko3f39d5c2015-10-13 09:27:13 -070049 brillo::ErrorPtr* /*error*/,
Alex Deymod5561a52015-09-03 23:17:52 -070050 int /*timeout_ms*/));
51 MOCK_METHOD5(StartSessionAsync,
52 void(const std::string& /*in_email_address*/,
53 const std::string& /*in_unique_identifier*/,
54 const base::Callback<void(bool /*done*/)>& /*success_callback*/,
Alex Vakulenko3f39d5c2015-10-13 09:27:13 -070055 const base::Callback<void(brillo::Error*)>& /*error_callback*/,
Alex Deymod5561a52015-09-03 23:17:52 -070056 int /*timeout_ms*/));
57 MOCK_METHOD4(StopSession,
58 bool(const std::string& /*in_unique_identifier*/,
59 bool* /*out_done*/,
Alex Vakulenko3f39d5c2015-10-13 09:27:13 -070060 brillo::ErrorPtr* /*error*/,
Alex Deymod5561a52015-09-03 23:17:52 -070061 int /*timeout_ms*/));
62 MOCK_METHOD4(StopSessionAsync,
63 void(const std::string& /*in_unique_identifier*/,
64 const base::Callback<void(bool /*done*/)>& /*success_callback*/,
Alex Vakulenko3f39d5c2015-10-13 09:27:13 -070065 const base::Callback<void(brillo::Error*)>& /*error_callback*/,
Alex Deymod5561a52015-09-03 23:17:52 -070066 int /*timeout_ms*/));
67 MOCK_METHOD4(StorePolicy,
68 bool(const std::vector<uint8_t>& /*in_policy_blob*/,
69 bool* /*out_done*/,
Alex Vakulenko3f39d5c2015-10-13 09:27:13 -070070 brillo::ErrorPtr* /*error*/,
Alex Deymod5561a52015-09-03 23:17:52 -070071 int /*timeout_ms*/));
72 MOCK_METHOD4(StorePolicyAsync,
73 void(const std::vector<uint8_t>& /*in_policy_blob*/,
74 const base::Callback<void(bool /*done*/)>& /*success_callback*/,
Alex Vakulenko3f39d5c2015-10-13 09:27:13 -070075 const base::Callback<void(brillo::Error*)>& /*error_callback*/,
Alex Deymod5561a52015-09-03 23:17:52 -070076 int /*timeout_ms*/));
77 MOCK_METHOD3(RetrievePolicy,
78 bool(std::vector<uint8_t>* /*out_policy_blob*/,
Alex Vakulenko3f39d5c2015-10-13 09:27:13 -070079 brillo::ErrorPtr* /*error*/,
Alex Deymod5561a52015-09-03 23:17:52 -070080 int /*timeout_ms*/));
81 MOCK_METHOD3(RetrievePolicyAsync,
82 void(const base::Callback<void(const std::vector<uint8_t>& /*policy_blob*/)>& /*success_callback*/,
Alex Vakulenko3f39d5c2015-10-13 09:27:13 -070083 const base::Callback<void(brillo::Error*)>& /*error_callback*/,
Alex Deymod5561a52015-09-03 23:17:52 -070084 int /*timeout_ms*/));
85 MOCK_METHOD5(StorePolicyForUser,
86 bool(const std::string& /*in_user_email*/,
87 const std::vector<uint8_t>& /*in_policy_blob*/,
88 bool* /*out_done*/,
Alex Vakulenko3f39d5c2015-10-13 09:27:13 -070089 brillo::ErrorPtr* /*error*/,
Alex Deymod5561a52015-09-03 23:17:52 -070090 int /*timeout_ms*/));
91 MOCK_METHOD5(StorePolicyForUserAsync,
92 void(const std::string& /*in_user_email*/,
93 const std::vector<uint8_t>& /*in_policy_blob*/,
94 const base::Callback<void(bool /*done*/)>& /*success_callback*/,
Alex Vakulenko3f39d5c2015-10-13 09:27:13 -070095 const base::Callback<void(brillo::Error*)>& /*error_callback*/,
Alex Deymod5561a52015-09-03 23:17:52 -070096 int /*timeout_ms*/));
97 MOCK_METHOD4(RetrievePolicyForUser,
98 bool(const std::string& /*in_user_email*/,
99 std::vector<uint8_t>* /*out_policy_blob*/,
Alex Vakulenko3f39d5c2015-10-13 09:27:13 -0700100 brillo::ErrorPtr* /*error*/,
Alex Deymod5561a52015-09-03 23:17:52 -0700101 int /*timeout_ms*/));
102 MOCK_METHOD4(RetrievePolicyForUserAsync,
103 void(const std::string& /*in_user_email*/,
104 const base::Callback<void(const std::vector<uint8_t>& /*policy_blob*/)>& /*success_callback*/,
Alex Vakulenko3f39d5c2015-10-13 09:27:13 -0700105 const base::Callback<void(brillo::Error*)>& /*error_callback*/,
Alex Deymod5561a52015-09-03 23:17:52 -0700106 int /*timeout_ms*/));
107 MOCK_METHOD5(StoreDeviceLocalAccountPolicy,
108 bool(const std::string& /*in_account_id*/,
109 const std::vector<uint8_t>& /*in_policy_blob*/,
110 bool* /*out_done*/,
Alex Vakulenko3f39d5c2015-10-13 09:27:13 -0700111 brillo::ErrorPtr* /*error*/,
Alex Deymod5561a52015-09-03 23:17:52 -0700112 int /*timeout_ms*/));
113 MOCK_METHOD5(StoreDeviceLocalAccountPolicyAsync,
114 void(const std::string& /*in_account_id*/,
115 const std::vector<uint8_t>& /*in_policy_blob*/,
116 const base::Callback<void(bool /*done*/)>& /*success_callback*/,
Alex Vakulenko3f39d5c2015-10-13 09:27:13 -0700117 const base::Callback<void(brillo::Error*)>& /*error_callback*/,
Alex Deymod5561a52015-09-03 23:17:52 -0700118 int /*timeout_ms*/));
119 MOCK_METHOD4(RetrieveDeviceLocalAccountPolicy,
120 bool(const std::string& /*in_account_id*/,
121 std::vector<uint8_t>* /*out_policy_blob*/,
Alex Vakulenko3f39d5c2015-10-13 09:27:13 -0700122 brillo::ErrorPtr* /*error*/,
Alex Deymod5561a52015-09-03 23:17:52 -0700123 int /*timeout_ms*/));
124 MOCK_METHOD4(RetrieveDeviceLocalAccountPolicyAsync,
125 void(const std::string& /*in_account_id*/,
126 const base::Callback<void(const std::vector<uint8_t>& /*policy_blob*/)>& /*success_callback*/,
Alex Vakulenko3f39d5c2015-10-13 09:27:13 -0700127 const base::Callback<void(brillo::Error*)>& /*error_callback*/,
Alex Deymod5561a52015-09-03 23:17:52 -0700128 int /*timeout_ms*/));
129 MOCK_METHOD3(RetrieveSessionState,
130 bool(std::string* /*out_state*/,
Alex Vakulenko3f39d5c2015-10-13 09:27:13 -0700131 brillo::ErrorPtr* /*error*/,
Alex Deymod5561a52015-09-03 23:17:52 -0700132 int /*timeout_ms*/));
133 MOCK_METHOD3(RetrieveSessionStateAsync,
134 void(const base::Callback<void(const std::string& /*state*/)>& /*success_callback*/,
Alex Vakulenko3f39d5c2015-10-13 09:27:13 -0700135 const base::Callback<void(brillo::Error*)>& /*error_callback*/,
Alex Deymod5561a52015-09-03 23:17:52 -0700136 int /*timeout_ms*/));
137 MOCK_METHOD3(RetrieveActiveSessions,
138 bool(std::map<std::string, std::string>* /*out_sessions*/,
Alex Vakulenko3f39d5c2015-10-13 09:27:13 -0700139 brillo::ErrorPtr* /*error*/,
Alex Deymod5561a52015-09-03 23:17:52 -0700140 int /*timeout_ms*/));
141 MOCK_METHOD3(RetrieveActiveSessionsAsync,
142 void(const base::Callback<void(const std::map<std::string, std::string>& /*sessions*/)>& /*success_callback*/,
Alex Vakulenko3f39d5c2015-10-13 09:27:13 -0700143 const base::Callback<void(brillo::Error*)>& /*error_callback*/,
Alex Deymod5561a52015-09-03 23:17:52 -0700144 int /*timeout_ms*/));
145 MOCK_METHOD2(HandleSupervisedUserCreationStarting,
Alex Vakulenko3f39d5c2015-10-13 09:27:13 -0700146 bool(brillo::ErrorPtr* /*error*/,
Alex Deymod5561a52015-09-03 23:17:52 -0700147 int /*timeout_ms*/));
148 MOCK_METHOD3(HandleSupervisedUserCreationStartingAsync,
149 void(const base::Callback<void()>& /*success_callback*/,
Alex Vakulenko3f39d5c2015-10-13 09:27:13 -0700150 const base::Callback<void(brillo::Error*)>& /*error_callback*/,
Alex Deymod5561a52015-09-03 23:17:52 -0700151 int /*timeout_ms*/));
152 MOCK_METHOD2(HandleSupervisedUserCreationFinished,
Alex Vakulenko3f39d5c2015-10-13 09:27:13 -0700153 bool(brillo::ErrorPtr* /*error*/,
Alex Deymod5561a52015-09-03 23:17:52 -0700154 int /*timeout_ms*/));
155 MOCK_METHOD3(HandleSupervisedUserCreationFinishedAsync,
156 void(const base::Callback<void()>& /*success_callback*/,
Alex Vakulenko3f39d5c2015-10-13 09:27:13 -0700157 const base::Callback<void(brillo::Error*)>& /*error_callback*/,
Alex Deymod5561a52015-09-03 23:17:52 -0700158 int /*timeout_ms*/));
159 MOCK_METHOD2(LockScreen,
Alex Vakulenko3f39d5c2015-10-13 09:27:13 -0700160 bool(brillo::ErrorPtr* /*error*/,
Alex Deymod5561a52015-09-03 23:17:52 -0700161 int /*timeout_ms*/));
162 MOCK_METHOD3(LockScreenAsync,
163 void(const base::Callback<void()>& /*success_callback*/,
Alex Vakulenko3f39d5c2015-10-13 09:27:13 -0700164 const base::Callback<void(brillo::Error*)>& /*error_callback*/,
Alex Deymod5561a52015-09-03 23:17:52 -0700165 int /*timeout_ms*/));
166 MOCK_METHOD2(HandleLockScreenShown,
Alex Vakulenko3f39d5c2015-10-13 09:27:13 -0700167 bool(brillo::ErrorPtr* /*error*/,
Alex Deymod5561a52015-09-03 23:17:52 -0700168 int /*timeout_ms*/));
169 MOCK_METHOD3(HandleLockScreenShownAsync,
170 void(const base::Callback<void()>& /*success_callback*/,
Alex Vakulenko3f39d5c2015-10-13 09:27:13 -0700171 const base::Callback<void(brillo::Error*)>& /*error_callback*/,
Alex Deymod5561a52015-09-03 23:17:52 -0700172 int /*timeout_ms*/));
173 MOCK_METHOD2(HandleLockScreenDismissed,
Alex Vakulenko3f39d5c2015-10-13 09:27:13 -0700174 bool(brillo::ErrorPtr* /*error*/,
Alex Deymod5561a52015-09-03 23:17:52 -0700175 int /*timeout_ms*/));
176 MOCK_METHOD3(HandleLockScreenDismissedAsync,
177 void(const base::Callback<void()>& /*success_callback*/,
Alex Vakulenko3f39d5c2015-10-13 09:27:13 -0700178 const base::Callback<void(brillo::Error*)>& /*error_callback*/,
Alex Deymod5561a52015-09-03 23:17:52 -0700179 int /*timeout_ms*/));
180 MOCK_METHOD4(RestartJob,
181 bool(const dbus::FileDescriptor& /*in_cred_fd*/,
182 const std::vector<std::string>& /*in_argv*/,
Alex Vakulenko3f39d5c2015-10-13 09:27:13 -0700183 brillo::ErrorPtr* /*error*/,
Alex Deymod5561a52015-09-03 23:17:52 -0700184 int /*timeout_ms*/));
185 MOCK_METHOD5(RestartJobAsync,
186 void(const dbus::FileDescriptor& /*in_cred_fd*/,
187 const std::vector<std::string>& /*in_argv*/,
188 const base::Callback<void()>& /*success_callback*/,
Alex Vakulenko3f39d5c2015-10-13 09:27:13 -0700189 const base::Callback<void(brillo::Error*)>& /*error_callback*/,
Alex Deymod5561a52015-09-03 23:17:52 -0700190 int /*timeout_ms*/));
191 MOCK_METHOD3(StartDeviceWipe,
192 bool(bool* /*out_done*/,
Alex Vakulenko3f39d5c2015-10-13 09:27:13 -0700193 brillo::ErrorPtr* /*error*/,
Alex Deymod5561a52015-09-03 23:17:52 -0700194 int /*timeout_ms*/));
195 MOCK_METHOD3(StartDeviceWipeAsync,
196 void(const base::Callback<void(bool /*done*/)>& /*success_callback*/,
Alex Vakulenko3f39d5c2015-10-13 09:27:13 -0700197 const base::Callback<void(brillo::Error*)>& /*error_callback*/,
Alex Deymod5561a52015-09-03 23:17:52 -0700198 int /*timeout_ms*/));
199 MOCK_METHOD4(SetFlagsForUser,
200 bool(const std::string& /*in_user_email*/,
201 const std::vector<std::string>& /*in_flags*/,
Alex Vakulenko3f39d5c2015-10-13 09:27:13 -0700202 brillo::ErrorPtr* /*error*/,
Alex Deymod5561a52015-09-03 23:17:52 -0700203 int /*timeout_ms*/));
204 MOCK_METHOD5(SetFlagsForUserAsync,
205 void(const std::string& /*in_user_email*/,
206 const std::vector<std::string>& /*in_flags*/,
207 const base::Callback<void()>& /*success_callback*/,
Alex Vakulenko3f39d5c2015-10-13 09:27:13 -0700208 const base::Callback<void(brillo::Error*)>& /*error_callback*/,
Alex Deymod5561a52015-09-03 23:17:52 -0700209 int /*timeout_ms*/));
210 MOCK_METHOD3(GetServerBackedStateKeys,
211 bool(std::vector<std::vector<uint8_t>>* /*out_state_keys*/,
Alex Vakulenko3f39d5c2015-10-13 09:27:13 -0700212 brillo::ErrorPtr* /*error*/,
Alex Deymod5561a52015-09-03 23:17:52 -0700213 int /*timeout_ms*/));
214 MOCK_METHOD3(GetServerBackedStateKeysAsync,
215 void(const base::Callback<void(const std::vector<std::vector<uint8_t>>& /*state_keys*/)>& /*success_callback*/,
Alex Vakulenko3f39d5c2015-10-13 09:27:13 -0700216 const base::Callback<void(brillo::Error*)>& /*error_callback*/,
Alex Deymod5561a52015-09-03 23:17:52 -0700217 int /*timeout_ms*/));
218 MOCK_METHOD3(InitMachineInfo,
219 bool(const std::string& /*in_data*/,
Alex Vakulenko3f39d5c2015-10-13 09:27:13 -0700220 brillo::ErrorPtr* /*error*/,
Alex Deymod5561a52015-09-03 23:17:52 -0700221 int /*timeout_ms*/));
222 MOCK_METHOD4(InitMachineInfoAsync,
223 void(const std::string& /*in_data*/,
224 const base::Callback<void()>& /*success_callback*/,
Alex Vakulenko3f39d5c2015-10-13 09:27:13 -0700225 const base::Callback<void(brillo::Error*)>& /*error_callback*/,
Alex Deymod5561a52015-09-03 23:17:52 -0700226 int /*timeout_ms*/));
227 MOCK_METHOD2(RegisterLoginPromptVisibleSignalHandler,
228 void(const base::Closure& /*signal_callback*/,
229 dbus::ObjectProxy::OnConnectedCallback /*on_connected_callback*/));
230 MOCK_METHOD2(RegisterSessionStateChangedSignalHandler,
231 void(const base::Callback<void(const std::string&)>& /*signal_callback*/,
232 dbus::ObjectProxy::OnConnectedCallback /*on_connected_callback*/));
233 MOCK_METHOD2(RegisterSetOwnerKeyCompleteSignalHandler,
234 void(const base::Callback<void(const std::string&)>& /*signal_callback*/,
235 dbus::ObjectProxy::OnConnectedCallback /*on_connected_callback*/));
236 MOCK_METHOD2(RegisterPropertyChangeCompleteSignalHandler,
237 void(const base::Callback<void(const std::string&)>& /*signal_callback*/,
238 dbus::ObjectProxy::OnConnectedCallback /*on_connected_callback*/));
239 MOCK_METHOD2(RegisterScreenIsLockedSignalHandler,
240 void(const base::Closure& /*signal_callback*/,
241 dbus::ObjectProxy::OnConnectedCallback /*on_connected_callback*/));
242 MOCK_METHOD2(RegisterScreenIsUnlockedSignalHandler,
243 void(const base::Closure& /*signal_callback*/,
244 dbus::ObjectProxy::OnConnectedCallback /*on_connected_callback*/));
245
246 private:
247 DISALLOW_COPY_AND_ASSIGN(SessionManagerInterfaceProxyMock);
248};
249} // namespace chromium
250} // namespace org
251
252#endif // ____CHROMEOS_DBUS_BINDING____________________BUILD_LINK_VAR_CACHE_PORTAGE_CHROMEOS_BASE_CHROMEOS_LOGIN_OUT_DEFAULT_GEN_INCLUDE_SESSION_MANAGER_DBUS_PROXY_MOCKS_H