#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
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.
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;
// 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_;
// 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);
};