1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROMEOS_DBUS_FAKE_LEADERSHIP_DAEMON_MANAGER_CLIENT_H_
6 #define CHROMEOS_DBUS_FAKE_LEADERSHIP_DAEMON_MANAGER_CLIENT_H_
12 #include "chromeos/dbus/leadership_daemon_manager_client.h"
16 // A fake implementation of LeadershipDaemonManagerClient. Invokes callbacks
18 class FakeLeadershipDaemonManagerClient
: public LeadershipDaemonManagerClient
{
20 FakeLeadershipDaemonManagerClient();
21 ~FakeLeadershipDaemonManagerClient() override
;
23 // DBusClient overrides:
24 void Init(dbus::Bus
* bus
) override
;
26 // LeadershipDaemonManagerClient overrides:
27 void AddObserver(Observer
* observer
) override
;
28 void RemoveObserver(Observer
* observer
) override
;
29 void JoinGroup(const std::string
& group
,
30 const base::DictionaryValue
& options
,
31 const ObjectPathDBusMethodCallback
& callback
) override
;
32 void LeaveGroup(const std::string
& object_path
,
33 const VoidDBusMethodCallback
& callback
) override
;
34 void SetScore(const std::string
& object_path
,
36 const VoidDBusMethodCallback
& callback
) override
;
37 void PokeLeader(const std::string
& object_path
,
38 const VoidDBusMethodCallback
& callback
) override
;
39 void Ping(const StringDBusMethodCallback
& callback
) override
;
40 const GroupProperties
* GetGroupProperties(
41 const dbus::ObjectPath
& object_path
) override
;
44 DISALLOW_COPY_AND_ASSIGN(FakeLeadershipDaemonManagerClient
);
47 } // namespace chromeos
49 #endif // CHROMEOS_DBUS_FAKE_LEADERSHIP_DAEMON_MANAGER_CLIENT_H_