Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / chromeos / dbus / fake_shill_manager_client.h
index 339e0d1..7f24ca2 100644 (file)
 #include "chromeos/chromeos_export.h"
 #include "chromeos/dbus/shill_manager_client.h"
 
+namespace net {
+class IPEndPoint;
+}
+
 namespace chromeos {
 
 // A fake implementation of ShillManagerClient. This works in close coordination
@@ -77,6 +81,18 @@ class CHROMEOS_EXPORT FakeShillManagerClient
   virtual void ConnectToBestServices(
       const base::Closure& callback,
       const ErrorCallback& error_callback) OVERRIDE;
+  virtual void AddWakeOnPacketConnection(
+      const net::IPEndPoint& ip_connection,
+      const base::Closure& callback,
+      const ErrorCallback& error_callback) OVERRIDE;
+  virtual void RemoveWakeOnPacketConnection(
+      const net::IPEndPoint& ip_endpoint,
+      const base::Closure& callback,
+      const ErrorCallback& error_callback) OVERRIDE;
+  virtual void RemoveAllWakeOnPacketConnections(
+      const base::Closure& callback,
+      const ErrorCallback& error_callback) OVERRIDE;
+
   virtual ShillManagerClient::TestInterface* GetTestInterface() OVERRIDE;
 
   // ShillManagerClient::TestInterface overrides.
@@ -94,18 +110,21 @@ class CHROMEOS_EXPORT FakeShillManagerClient
   virtual void SetManagerProperty(const std::string& key,
                                   const base::Value& value) OVERRIDE;
   virtual void AddManagerService(const std::string& service_path,
-                                 bool add_to_visible_list,
-                                 bool add_to_watch_list) OVERRIDE;
+                                 bool notify_observers) OVERRIDE;
   virtual void RemoveManagerService(const std::string& service_path) OVERRIDE;
   virtual void ClearManagerServices() OVERRIDE;
   virtual void ServiceStateChanged(const std::string& service_path,
                                    const std::string& state) OVERRIDE;
-  virtual void SortManagerServices() OVERRIDE;
+  virtual void SortManagerServices(bool notify) OVERRIDE;
   virtual void SetupDefaultEnvironment() OVERRIDE;
   virtual int GetInteractiveDelay() const OVERRIDE;
+  virtual void SetBestServiceToConnect(
+      const std::string& service_path) OVERRIDE;
+
+  // Constants used for testing.
+  static const char kFakeEthernetNetworkGuid[];
 
  private:
-  void AddServiceToWatchList(const std::string& service_path);
   void SetDefaultProperties();
   void PassStubProperties(const DictionaryValueCallback& callback) const;
   void PassStubGeoNetworks(const DictionaryValueCallback& callback) const;
@@ -141,6 +160,9 @@ class CHROMEOS_EXPORT FakeShillManagerClient
 
   // Initial state for fake services.
   std::map<std::string, std::string> shill_initial_state_map_;
+  typedef std::map<std::string, base::Value*> ShillPropertyMap;
+  typedef std::map<std::string, ShillPropertyMap> DevicePropertyMap;
+  DevicePropertyMap shill_device_property_map_;
 
   ObserverList<ShillPropertyChangedObserver> observer_list_;
 
@@ -151,6 +173,9 @@ class CHROMEOS_EXPORT FakeShillManagerClient
   // Track the default service for signaling Manager.DefaultService.
   std::string default_service_;
 
+  // 'Best' service to connect to on ConnectToBestServices() calls.
+  std::string best_service_;
+
   DISALLOW_COPY_AND_ASSIGN(FakeShillManagerClient);
 };