| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROMEOS_DBUS_SHILL_MANAGER_CLIENT_STUB_H_ | 5 #ifndef CHROMEOS_DBUS_SHILL_MANAGER_CLIENT_STUB_H_ |
| 6 #define CHROMEOS_DBUS_SHILL_MANAGER_CLIENT_STUB_H_ | 6 #define CHROMEOS_DBUS_SHILL_MANAGER_CLIENT_STUB_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 #include "base/callback.h" | 11 #include "base/callback.h" |
| 12 #include "chromeos/dbus/shill_manager_client.h" | 12 #include "chromeos/dbus/shill_manager_client.h" |
| 13 | 13 |
| 14 namespace chromeos { | 14 namespace chromeos { |
| 15 | 15 |
| 16 // A stub implementation of ShillManagerClient. | 16 // A stub implementation of ShillManagerClient. This works in close coordination |
| 17 // Implemented: Stub devices and services for NetworkStateManager tests. | 17 // with ShillServiceClientStub. ShillDeviceClientStub, and |
| 18 // Implemented: Stub cellular device entry for SMS tests. | 18 // ShillProfileClientStub, and is not intended to be used independently. |
| 19 class ShillManagerClientStub : public ShillManagerClient, | 19 class ShillManagerClientStub : public ShillManagerClient, |
| 20 public ShillManagerClient::TestInterface { | 20 public ShillManagerClient::TestInterface { |
| 21 public: | 21 public: |
| 22 ShillManagerClientStub(); | 22 ShillManagerClientStub(); |
| 23 virtual ~ShillManagerClientStub(); | 23 virtual ~ShillManagerClientStub(); |
| 24 | 24 |
| 25 // ShillManagerClient overrides. | 25 // ShillManagerClient overrides. |
| 26 virtual void AddPropertyChangedObserver( | 26 virtual void AddPropertyChangedObserver( |
| 27 ShillPropertyChangedObserver* observer) OVERRIDE; | 27 ShillPropertyChangedObserver* observer) OVERRIDE; |
| 28 virtual void RemovePropertyChangedObserver( | 28 virtual void RemovePropertyChangedObserver( |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 virtual void ConnectToBestServices( | 87 virtual void ConnectToBestServices( |
| 88 const base::Closure& callback, | 88 const base::Closure& callback, |
| 89 const ErrorCallback& error_callback) OVERRIDE; | 89 const ErrorCallback& error_callback) OVERRIDE; |
| 90 virtual ShillManagerClient::TestInterface* GetTestInterface() OVERRIDE; | 90 virtual ShillManagerClient::TestInterface* GetTestInterface() OVERRIDE; |
| 91 | 91 |
| 92 // ShillManagerClient::TestInterface overrides. | 92 // ShillManagerClient::TestInterface overrides. |
| 93 | 93 |
| 94 virtual void AddDevice(const std::string& device_path) OVERRIDE; | 94 virtual void AddDevice(const std::string& device_path) OVERRIDE; |
| 95 virtual void RemoveDevice(const std::string& device_path) OVERRIDE; | 95 virtual void RemoveDevice(const std::string& device_path) OVERRIDE; |
| 96 virtual void ClearDevices() OVERRIDE; | 96 virtual void ClearDevices() OVERRIDE; |
| 97 virtual void ClearServices() OVERRIDE; | 97 virtual void ClearManagerServices() OVERRIDE; |
| 98 virtual void AddService(const std::string& service_path, | 98 virtual void AddManagerService(const std::string& service_path, |
| 99 bool add_to_watch_list) OVERRIDE; | |
| 100 virtual void AddServiceAtIndex(const std::string& service_path, | |
| 101 size_t index, | |
| 102 bool add_to_watch_list) OVERRIDE; | 99 bool add_to_watch_list) OVERRIDE; |
| 103 virtual void RemoveService(const std::string& service_path) OVERRIDE; | 100 virtual void MoveServiceToIndex(const std::string& service_path, |
| 101 size_t index, |
| 102 bool add_to_watch_list) OVERRIDE; |
| 103 virtual void RemoveManagerService(const std::string& service_path) OVERRIDE; |
| 104 virtual void AddTechnology(const std::string& type, bool enabled) OVERRIDE; | 104 virtual void AddTechnology(const std::string& type, bool enabled) OVERRIDE; |
| 105 virtual void RemoveTechnology(const std::string& type) OVERRIDE; | 105 virtual void RemoveTechnology(const std::string& type) OVERRIDE; |
| 106 virtual void SetTechnologyInitializing(const std::string& type, | 106 virtual void SetTechnologyInitializing(const std::string& type, |
| 107 bool initializing) OVERRIDE; | 107 bool initializing) OVERRIDE; |
| 108 virtual void AddGeoNetwork(const std::string& technology, | 108 virtual void AddGeoNetwork(const std::string& technology, |
| 109 const base::DictionaryValue& network) OVERRIDE; | 109 const base::DictionaryValue& network) OVERRIDE; |
| 110 virtual void ClearProperties() OVERRIDE; | 110 virtual void ClearProperties() OVERRIDE; |
| 111 | 111 |
| 112 private: | 112 private: |
| 113 void AddServiceToWatchList(const std::string& service_path); | 113 void AddServiceToWatchList(const std::string& service_path); |
| (...skipping 22 matching lines...) Expand all Loading... |
| 136 // Note: This should remain the last member so it'll be destroyed and | 136 // Note: This should remain the last member so it'll be destroyed and |
| 137 // invalidate its weak pointers before any other members are destroyed. | 137 // invalidate its weak pointers before any other members are destroyed. |
| 138 base::WeakPtrFactory<ShillManagerClientStub> weak_ptr_factory_; | 138 base::WeakPtrFactory<ShillManagerClientStub> weak_ptr_factory_; |
| 139 | 139 |
| 140 DISALLOW_COPY_AND_ASSIGN(ShillManagerClientStub); | 140 DISALLOW_COPY_AND_ASSIGN(ShillManagerClientStub); |
| 141 }; | 141 }; |
| 142 | 142 |
| 143 } // namespace chromeos | 143 } // namespace chromeos |
| 144 | 144 |
| 145 #endif // CHROMEOS_DBUS_SHILL_MANAGER_CLIENT_STUB_H_ | 145 #endif // CHROMEOS_DBUS_SHILL_MANAGER_CLIENT_STUB_H_ |
| OLD | NEW |