| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_DEVICE_CLIENT_H_ | 5 #ifndef CHROMEOS_DBUS_SHILL_DEVICE_CLIENT_H_ |
| 6 #define CHROMEOS_DBUS_SHILL_DEVICE_CLIENT_H_ | 6 #define CHROMEOS_DBUS_SHILL_DEVICE_CLIENT_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 typedef ShillClientHelper::PropertyChangedHandler PropertyChangedHandler; | 39 typedef ShillClientHelper::PropertyChangedHandler PropertyChangedHandler; |
| 40 typedef ShillClientHelper::DictionaryValueCallback DictionaryValueCallback; | 40 typedef ShillClientHelper::DictionaryValueCallback DictionaryValueCallback; |
| 41 typedef ShillClientHelper::ErrorCallback ErrorCallback; | 41 typedef ShillClientHelper::ErrorCallback ErrorCallback; |
| 42 | 42 |
| 43 // Interface for setting up devices for testing. | 43 // Interface for setting up devices for testing. |
| 44 // Accessed through GetTestInterface(), only implemented in the Stub Impl. | 44 // Accessed through GetTestInterface(), only implemented in the Stub Impl. |
| 45 class TestInterface { | 45 class TestInterface { |
| 46 public: | 46 public: |
| 47 virtual void AddDevice(const std::string& device_path, | 47 virtual void AddDevice(const std::string& device_path, |
| 48 const std::string& type, | 48 const std::string& type, |
| 49 const std::string& object_path, | 49 const std::string& object_path) = 0; |
| 50 const std::string& connection_path) = 0; | |
| 51 virtual void RemoveDevice(const std::string& device_path) = 0; | 50 virtual void RemoveDevice(const std::string& device_path) = 0; |
| 52 virtual void ClearDevices() = 0; | 51 virtual void ClearDevices() = 0; |
| 52 virtual void SetDeviceProperty(const std::string& device_path, |
| 53 const std::string& name, |
| 54 const base::Value& value) = 0; |
| 53 | 55 |
| 54 protected: | 56 protected: |
| 55 ~TestInterface() {} | 57 ~TestInterface() {} |
| 56 }; | 58 }; |
| 57 | 59 |
| 58 virtual ~ShillDeviceClient(); | 60 virtual ~ShillDeviceClient(); |
| 59 | 61 |
| 60 // Factory function, creates a new instance which is owned by the caller. | 62 // Factory function, creates a new instance which is owned by the caller. |
| 61 // For normal usage, access the singleton via DBusThreadManager::Get(). | 63 // For normal usage, access the singleton via DBusThreadManager::Get(). |
| 62 static ShillDeviceClient* Create(DBusClientImplementationType type, | 64 static ShillDeviceClient* Create(DBusClientImplementationType type, |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 // Create() should be used instead. | 165 // Create() should be used instead. |
| 164 ShillDeviceClient(); | 166 ShillDeviceClient(); |
| 165 | 167 |
| 166 private: | 168 private: |
| 167 DISALLOW_COPY_AND_ASSIGN(ShillDeviceClient); | 169 DISALLOW_COPY_AND_ASSIGN(ShillDeviceClient); |
| 168 }; | 170 }; |
| 169 | 171 |
| 170 } // namespace chromeos | 172 } // namespace chromeos |
| 171 | 173 |
| 172 #endif // CHROMEOS_DBUS_SHILL_DEVICE_CLIENT_H_ | 174 #endif // CHROMEOS_DBUS_SHILL_DEVICE_CLIENT_H_ |
| OLD | NEW |