| OLD | NEW |
| (Empty) |
| 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. | |
| 4 | |
| 5 #ifndef CHROMEOS_DBUS_FAKE_PEER_DAEMON_MANAGER_CLIENT_H_ | |
| 6 #define CHROMEOS_DBUS_FAKE_PEER_DAEMON_MANAGER_CLIENT_H_ | |
| 7 | |
| 8 #include <map> | |
| 9 #include <string> | |
| 10 #include <vector> | |
| 11 | |
| 12 #include "base/macros.h" | |
| 13 #include "chromeos/dbus/peer_daemon_manager_client.h" | |
| 14 | |
| 15 namespace chromeos { | |
| 16 | |
| 17 // A fake implementation of PeerDaemonManagerClient. Invokes callbacks | |
| 18 // immediately. | |
| 19 class FakePeerDaemonManagerClient : public PeerDaemonManagerClient { | |
| 20 public: | |
| 21 FakePeerDaemonManagerClient(); | |
| 22 ~FakePeerDaemonManagerClient() override; | |
| 23 | |
| 24 // DBusClient overrides: | |
| 25 void Init(dbus::Bus* bus) override; | |
| 26 | |
| 27 // PeerDaemonManagerClient overrides: | |
| 28 void AddObserver(Observer* observer) override; | |
| 29 void RemoveObserver(Observer* observer) override; | |
| 30 std::vector<dbus::ObjectPath> GetPeers() override; | |
| 31 std::vector<dbus::ObjectPath> GetServices() override; | |
| 32 PeerProperties* GetPeerProperties( | |
| 33 const dbus::ObjectPath& object_path) override; | |
| 34 ServiceProperties* GetServiceProperties( | |
| 35 const dbus::ObjectPath& object_path) override; | |
| 36 void StartMonitoring(const std::vector<std::string>& requested_technologies, | |
| 37 const base::DictionaryValue& options, | |
| 38 const StringDBusMethodCallback& callback) override; | |
| 39 void StopMonitoring(const std::string& monitoring_token, | |
| 40 const VoidDBusMethodCallback& callback) override; | |
| 41 void ExposeService(const std::string& service_id, | |
| 42 const std::map<std::string, std::string>& service_info, | |
| 43 const base::DictionaryValue& options, | |
| 44 const StringDBusMethodCallback& callback) override; | |
| 45 void RemoveExposedService(const std::string& service_token, | |
| 46 const VoidDBusMethodCallback& callback) override; | |
| 47 void Ping(const StringDBusMethodCallback& callback) override; | |
| 48 | |
| 49 private: | |
| 50 DISALLOW_COPY_AND_ASSIGN(FakePeerDaemonManagerClient); | |
| 51 }; | |
| 52 | |
| 53 } // namespace chromeos | |
| 54 | |
| 55 #endif // CHROMEOS_DBUS_FAKE_PEER_DAEMON_MANAGER_CLIENT_H_ | |
| OLD | NEW |