Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(142)

Unified Diff: chromeos/dbus/shill_manager_client.h

Issue 11192024: Add chromeos::NetworkStateManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Clang fixes Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chromeos/dbus/shill_manager_client.h
diff --git a/chromeos/dbus/shill_manager_client.h b/chromeos/dbus/shill_manager_client.h
index 8034830f50a14051470dcd2cef8d7eb7585b7a1d..17dff8c6ffeb69103072d4eece90a23a86f42679 100644
--- a/chromeos/dbus/shill_manager_client.h
+++ b/chromeos/dbus/shill_manager_client.h
@@ -32,6 +32,25 @@ class CHROMEOS_EXPORT ShillManagerClient {
typedef ShillClientHelper::DictionaryValueCallback DictionaryValueCallback;
typedef ShillClientHelper::ErrorCallback ErrorCallback;
+ // Interface for setting up devices, services, and technologies for testing.
+ // Accessed through GetTestInterface(), only implemented in the Stub Impl.
+ class TestInterface {
+ public:
+ virtual void AddDevice(const std::string& device_path) = 0;
+ virtual void RemoveDevice(const std::string& device_path) = 0;
+ virtual void AddService(const std::string& service_path,
+ bool add_to_watch_list) = 0;
+ virtual void InsertService(const std::string& service_path,
+ size_t index) = 0;
+ virtual void RemoveService(const std::string& service_path) = 0;
+ virtual void AddTechnology(const std::string& type, bool enabled) = 0;
+ virtual void RemoveTechnology(const std::string& type) = 0;
+ virtual void ClearProperties() = 0;
+
+ protected:
+ ~TestInterface() {}
+ };
+
virtual ~ShillManagerClient();
// Factory function, creates a new instance which is owned by the caller.
@@ -96,6 +115,9 @@ class CHROMEOS_EXPORT ShillManagerClient {
const ObjectPathCallback& callback,
const ErrorCallback& error_callback) = 0;
+ // Returns an interface for testing (stub only), or returns NULL.
+ virtual TestInterface* GetTestInterface() = 0;
+
protected:
// Create() should be used instead.
ShillManagerClient();

Powered by Google App Engine
This is Rietveld 408576698