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_SERVICE_CLIENT_H_ | 5 #ifndef CHROMEOS_DBUS_SHILL_SERVICE_CLIENT_H_ |
6 #define CHROMEOS_DBUS_SHILL_SERVICE_CLIENT_H_ | 6 #define CHROMEOS_DBUS_SHILL_SERVICE_CLIENT_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 29 matching lines...) Expand all Loading... |
40 typedef ShillClientHelper::ListValueCallback ListValueCallback; | 40 typedef ShillClientHelper::ListValueCallback ListValueCallback; |
41 typedef ShillClientHelper::ErrorCallback ErrorCallback; | 41 typedef ShillClientHelper::ErrorCallback ErrorCallback; |
42 | 42 |
43 // Interface for setting up services for testing. Accessed through | 43 // Interface for setting up services for testing. Accessed through |
44 // GetTestInterface(), only implemented in the stub implementation. | 44 // GetTestInterface(), only implemented in the stub implementation. |
45 class TestInterface { | 45 class TestInterface { |
46 public: | 46 public: |
47 virtual void AddService(const std::string& service_path, | 47 virtual void AddService(const std::string& service_path, |
48 const std::string& name, | 48 const std::string& name, |
49 const std::string& type, | 49 const std::string& type, |
50 const std::string& state) = 0; | 50 const std::string& state, |
| 51 bool add_to_watch_list) = 0; |
51 virtual void RemoveService(const std::string& service_path) = 0; | 52 virtual void RemoveService(const std::string& service_path) = 0; |
52 virtual void SetServiceProperty(const std::string& service_path, | 53 virtual void SetServiceProperty(const std::string& service_path, |
53 const std::string& property, | 54 const std::string& property, |
54 const base::Value& value) = 0; | 55 const base::Value& value) = 0; |
| 56 virtual const base::DictionaryValue* GetServiceProperties( |
| 57 const std::string& service_path) const = 0; |
55 virtual void ClearServices() = 0; | 58 virtual void ClearServices() = 0; |
56 | 59 |
57 protected: | 60 protected: |
58 ~TestInterface() {} | 61 ~TestInterface() {} |
59 }; | 62 }; |
60 virtual ~ShillServiceClient(); | 63 virtual ~ShillServiceClient(); |
61 | 64 |
62 // Factory function, creates a new instance which is owned by the caller. | 65 // Factory function, creates a new instance which is owned by the caller. |
63 // For normal usage, access the singleton via DBusThreadManager::Get(). | 66 // For normal usage, access the singleton via DBusThreadManager::Get(). |
64 static ShillServiceClient* Create(DBusClientImplementationType type, | 67 static ShillServiceClient* Create(DBusClientImplementationType type, |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 // Create() should be used instead. | 153 // Create() should be used instead. |
151 ShillServiceClient(); | 154 ShillServiceClient(); |
152 | 155 |
153 private: | 156 private: |
154 DISALLOW_COPY_AND_ASSIGN(ShillServiceClient); | 157 DISALLOW_COPY_AND_ASSIGN(ShillServiceClient); |
155 }; | 158 }; |
156 | 159 |
157 } // namespace chromeos | 160 } // namespace chromeos |
158 | 161 |
159 #endif // CHROMEOS_DBUS_SHILL_SERVICE_CLIENT_H_ | 162 #endif // CHROMEOS_DBUS_SHILL_SERVICE_CLIENT_H_ |
OLD | NEW |