1 // Copyright 2014 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_PEER_DAEMON_MANAGER_CLIENT_H_
6 #define CHROMEOS_DBUS_FAKE_PEER_DAEMON_MANAGER_CLIENT_H_
12 #include "chromeos/dbus/peer_daemon_manager_client.h"
16 // A fake implementation of PeerDaemonManagerClient. Invokes callbacks
18 class FakePeerDaemonManagerClient
: public PeerDaemonManagerClient
{
20 FakePeerDaemonManagerClient();
21 ~FakePeerDaemonManagerClient() override
;
23 // DBusClient overrides:
24 void Init(dbus::Bus
* bus
) override
;
26 // PeerDaemonManagerClient overrides:
27 void AddObserver(Observer
* observer
) override
;
28 void RemoveObserver(Observer
* observer
) override
;
29 std::vector
<dbus::ObjectPath
> GetPeers() override
;
30 std::vector
<dbus::ObjectPath
> GetServices() override
;
31 PeerProperties
* GetPeerProperties(
32 const dbus::ObjectPath
& object_path
) override
;
33 ServiceProperties
* GetServiceProperties(
34 const dbus::ObjectPath
& object_path
) override
;
35 void StartMonitoring(const std::vector
<std::string
>& requested_technologies
,
36 const base::DictionaryValue
& options
,
37 const StringDBusMethodCallback
& callback
) override
;
38 void StopMonitoring(const std::string
& monitoring_token
,
39 const VoidDBusMethodCallback
& callback
) override
;
40 void ExposeService(const std::string
& service_id
,
41 const std::map
<std::string
, std::string
>& service_info
,
42 const base::DictionaryValue
& options
,
43 const StringDBusMethodCallback
& callback
) override
;
44 void RemoveExposedService(const std::string
& service_token
,
45 const VoidDBusMethodCallback
& callback
) override
;
46 void Ping(const StringDBusMethodCallback
& callback
) override
;
49 DISALLOW_COPY_AND_ASSIGN(FakePeerDaemonManagerClient
);
52 } // namespace chromeos
54 #endif // CHROMEOS_DBUS_FAKE_PEER_DAEMON_MANAGER_CLIENT_H_