Home | History | Annotate | Download | only in session_manager
      1 // 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>
     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 "session_manager/dbus-proxies.h"
     17 
     18 namespace org {
     19 namespace chromium {
     20 
     21 // Mock object for SessionManagerInterfaceProxyInterface.
     22 class SessionManagerInterfaceProxyMock : public SessionManagerInterfaceProxyInterface {
     23  public:
     24   SessionManagerInterfaceProxyMock() = default;
     25 
     26   MOCK_METHOD2(EmitLoginPromptVisible,
     27                bool(brillo::ErrorPtr* /*error*/,
     28                     int /*timeout_ms*/));
     29   MOCK_METHOD3(EmitLoginPromptVisibleAsync,
     30                void(const base::Callback<void()>& /*success_callback*/,
     31                     const base::Callback<void(brillo::Error*)>& /*error_callback*/,
     32                     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*/,
     37                     brillo::ErrorPtr* /*error*/,
     38                     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*/,
     43                     const base::Callback<void(brillo::Error*)>& /*error_callback*/,
     44                     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*/,
     49                     brillo::ErrorPtr* /*error*/,
     50                     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*/,
     55                     const base::Callback<void(brillo::Error*)>& /*error_callback*/,
     56                     int /*timeout_ms*/));
     57   MOCK_METHOD4(StopSession,
     58                bool(const std::string& /*in_unique_identifier*/,
     59                     bool* /*out_done*/,
     60                     brillo::ErrorPtr* /*error*/,
     61                     int /*timeout_ms*/));
     62   MOCK_METHOD4(StopSessionAsync,
     63                void(const std::string& /*in_unique_identifier*/,
     64                     const base::Callback<void(bool /*done*/)>& /*success_callback*/,
     65                     const base::Callback<void(brillo::Error*)>& /*error_callback*/,
     66                     int /*timeout_ms*/));
     67   MOCK_METHOD4(StorePolicy,
     68                bool(const std::vector<uint8_t>& /*in_policy_blob*/,
     69                     bool* /*out_done*/,
     70                     brillo::ErrorPtr* /*error*/,
     71                     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*/,
     75                     const base::Callback<void(brillo::Error*)>& /*error_callback*/,
     76                     int /*timeout_ms*/));
     77   MOCK_METHOD3(RetrievePolicy,
     78                bool(std::vector<uint8_t>* /*out_policy_blob*/,
     79                     brillo::ErrorPtr* /*error*/,
     80                     int /*timeout_ms*/));
     81   MOCK_METHOD3(RetrievePolicyAsync,
     82                void(const base::Callback<void(const std::vector<uint8_t>& /*policy_blob*/)>& /*success_callback*/,
     83                     const base::Callback<void(brillo::Error*)>& /*error_callback*/,
     84                     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*/,
     89                     brillo::ErrorPtr* /*error*/,
     90                     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*/,
     95                     const base::Callback<void(brillo::Error*)>& /*error_callback*/,
     96                     int /*timeout_ms*/));
     97   MOCK_METHOD4(RetrievePolicyForUser,
     98                bool(const std::string& /*in_user_email*/,
     99                     std::vector<uint8_t>* /*out_policy_blob*/,
    100                     brillo::ErrorPtr* /*error*/,
    101                     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*/,
    105                     const base::Callback<void(brillo::Error*)>& /*error_callback*/,
    106                     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*/,
    111                     brillo::ErrorPtr* /*error*/,
    112                     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*/,
    117                     const base::Callback<void(brillo::Error*)>& /*error_callback*/,
    118                     int /*timeout_ms*/));
    119   MOCK_METHOD4(RetrieveDeviceLocalAccountPolicy,
    120                bool(const std::string& /*in_account_id*/,
    121                     std::vector<uint8_t>* /*out_policy_blob*/,
    122                     brillo::ErrorPtr* /*error*/,
    123                     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*/,
    127                     const base::Callback<void(brillo::Error*)>& /*error_callback*/,
    128                     int /*timeout_ms*/));
    129   MOCK_METHOD3(RetrieveSessionState,
    130                bool(std::string* /*out_state*/,
    131                     brillo::ErrorPtr* /*error*/,
    132                     int /*timeout_ms*/));
    133   MOCK_METHOD3(RetrieveSessionStateAsync,
    134                void(const base::Callback<void(const std::string& /*state*/)>& /*success_callback*/,
    135                     const base::Callback<void(brillo::Error*)>& /*error_callback*/,
    136                     int /*timeout_ms*/));
    137   MOCK_METHOD3(RetrieveActiveSessions,
    138                bool(std::map<std::string, std::string>* /*out_sessions*/,
    139                     brillo::ErrorPtr* /*error*/,
    140                     int /*timeout_ms*/));
    141   MOCK_METHOD3(RetrieveActiveSessionsAsync,
    142                void(const base::Callback<void(const std::map<std::string, std::string>& /*sessions*/)>& /*success_callback*/,
    143                     const base::Callback<void(brillo::Error*)>& /*error_callback*/,
    144                     int /*timeout_ms*/));
    145   MOCK_METHOD2(HandleSupervisedUserCreationStarting,
    146                bool(brillo::ErrorPtr* /*error*/,
    147                     int /*timeout_ms*/));
    148   MOCK_METHOD3(HandleSupervisedUserCreationStartingAsync,
    149                void(const base::Callback<void()>& /*success_callback*/,
    150                     const base::Callback<void(brillo::Error*)>& /*error_callback*/,
    151                     int /*timeout_ms*/));
    152   MOCK_METHOD2(HandleSupervisedUserCreationFinished,
    153                bool(brillo::ErrorPtr* /*error*/,
    154                     int /*timeout_ms*/));
    155   MOCK_METHOD3(HandleSupervisedUserCreationFinishedAsync,
    156                void(const base::Callback<void()>& /*success_callback*/,
    157                     const base::Callback<void(brillo::Error*)>& /*error_callback*/,
    158                     int /*timeout_ms*/));
    159   MOCK_METHOD2(LockScreen,
    160                bool(brillo::ErrorPtr* /*error*/,
    161                     int /*timeout_ms*/));
    162   MOCK_METHOD3(LockScreenAsync,
    163                void(const base::Callback<void()>& /*success_callback*/,
    164                     const base::Callback<void(brillo::Error*)>& /*error_callback*/,
    165                     int /*timeout_ms*/));
    166   MOCK_METHOD2(HandleLockScreenShown,
    167                bool(brillo::ErrorPtr* /*error*/,
    168                     int /*timeout_ms*/));
    169   MOCK_METHOD3(HandleLockScreenShownAsync,
    170                void(const base::Callback<void()>& /*success_callback*/,
    171                     const base::Callback<void(brillo::Error*)>& /*error_callback*/,
    172                     int /*timeout_ms*/));
    173   MOCK_METHOD2(HandleLockScreenDismissed,
    174                bool(brillo::ErrorPtr* /*error*/,
    175                     int /*timeout_ms*/));
    176   MOCK_METHOD3(HandleLockScreenDismissedAsync,
    177                void(const base::Callback<void()>& /*success_callback*/,
    178                     const base::Callback<void(brillo::Error*)>& /*error_callback*/,
    179                     int /*timeout_ms*/));
    180   MOCK_METHOD4(RestartJob,
    181                bool(const dbus::FileDescriptor& /*in_cred_fd*/,
    182                     const std::vector<std::string>& /*in_argv*/,
    183                     brillo::ErrorPtr* /*error*/,
    184                     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*/,
    189                     const base::Callback<void(brillo::Error*)>& /*error_callback*/,
    190                     int /*timeout_ms*/));
    191   MOCK_METHOD3(StartDeviceWipe,
    192                bool(bool* /*out_done*/,
    193                     brillo::ErrorPtr* /*error*/,
    194                     int /*timeout_ms*/));
    195   MOCK_METHOD3(StartDeviceWipeAsync,
    196                void(const base::Callback<void(bool /*done*/)>& /*success_callback*/,
    197                     const base::Callback<void(brillo::Error*)>& /*error_callback*/,
    198                     int /*timeout_ms*/));
    199   MOCK_METHOD4(SetFlagsForUser,
    200                bool(const std::string& /*in_user_email*/,
    201                     const std::vector<std::string>& /*in_flags*/,
    202                     brillo::ErrorPtr* /*error*/,
    203                     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*/,
    208                     const base::Callback<void(brillo::Error*)>& /*error_callback*/,
    209                     int /*timeout_ms*/));
    210   MOCK_METHOD3(GetServerBackedStateKeys,
    211                bool(std::vector<std::vector<uint8_t>>* /*out_state_keys*/,
    212                     brillo::ErrorPtr* /*error*/,
    213                     int /*timeout_ms*/));
    214   MOCK_METHOD3(GetServerBackedStateKeysAsync,
    215                void(const base::Callback<void(const std::vector<std::vector<uint8_t>>& /*state_keys*/)>& /*success_callback*/,
    216                     const base::Callback<void(brillo::Error*)>& /*error_callback*/,
    217                     int /*timeout_ms*/));
    218   MOCK_METHOD3(InitMachineInfo,
    219                bool(const std::string& /*in_data*/,
    220                     brillo::ErrorPtr* /*error*/,
    221                     int /*timeout_ms*/));
    222   MOCK_METHOD4(InitMachineInfoAsync,
    223                void(const std::string& /*in_data*/,
    224                     const base::Callback<void()>& /*success_callback*/,
    225                     const base::Callback<void(brillo::Error*)>& /*error_callback*/,
    226                     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
    253