| 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 30 matching lines...) Expand all Loading... |
| 41 | 41 |
| 42 // Interface for setting up services for testing. Accessed through | 42 // Interface for setting up services for testing. Accessed through |
| 43 // GetTestInterface(), only implemented in the stub implementation. | 43 // GetTestInterface(), only implemented in the stub implementation. |
| 44 class TestInterface { | 44 class TestInterface { |
| 45 public: | 45 public: |
| 46 // Adds a Service to the Manager and Service stubs. | 46 // Adds a Service to the Manager and Service stubs. |
| 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, | 50 const std::string& state, |
| 51 bool add_to_visible_list) = 0; | 51 bool visible) = 0; |
| 52 virtual void AddServiceWithIPConfig(const std::string& service_path, | 52 virtual void AddServiceWithIPConfig(const std::string& service_path, |
| 53 const std::string& guid, | 53 const std::string& guid, |
| 54 const std::string& name, | 54 const std::string& name, |
| 55 const std::string& type, | 55 const std::string& type, |
| 56 const std::string& state, | 56 const std::string& state, |
| 57 const std::string& ipconfig_path, | 57 const std::string& ipconfig_path, |
| 58 bool add_to_visible_list) = 0; | 58 bool visible) = 0; |
| 59 // Sets the properties for a service but does not add it to the Manager |
| 60 // or Profile. Returns the properties for the service. |
| 61 virtual base::DictionaryValue* SetServiceProperties( |
| 62 const std::string& service_path, |
| 63 const std::string& guid, |
| 64 const std::string& name, |
| 65 const std::string& type, |
| 66 const std::string& state, |
| 67 bool visible) = 0; |
| 59 | 68 |
| 60 // Removes a Service to the Manager and Service stubs. | 69 // Removes a Service to the Manager and Service stubs. |
| 61 virtual void RemoveService(const std::string& service_path) = 0; | 70 virtual void RemoveService(const std::string& service_path) = 0; |
| 62 | 71 |
| 63 // Returns false if a Service matching |service_path| does not exist. | 72 // Returns false if a Service matching |service_path| does not exist. |
| 64 virtual bool SetServiceProperty(const std::string& service_path, | 73 virtual bool SetServiceProperty(const std::string& service_path, |
| 65 const std::string& property, | 74 const std::string& property, |
| 66 const base::Value& value) = 0; | 75 const base::Value& value) = 0; |
| 67 | 76 |
| 68 // Returns properties for |service_path| or NULL if no Service matches. | 77 // Returns properties for |service_path| or NULL if no Service matches. |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 // Create() should be used instead. | 185 // Create() should be used instead. |
| 177 ShillServiceClient(); | 186 ShillServiceClient(); |
| 178 | 187 |
| 179 private: | 188 private: |
| 180 DISALLOW_COPY_AND_ASSIGN(ShillServiceClient); | 189 DISALLOW_COPY_AND_ASSIGN(ShillServiceClient); |
| 181 }; | 190 }; |
| 182 | 191 |
| 183 } // namespace chromeos | 192 } // namespace chromeos |
| 184 | 193 |
| 185 #endif // CHROMEOS_DBUS_SHILL_SERVICE_CLIENT_H_ | 194 #endif // CHROMEOS_DBUS_SHILL_SERVICE_CLIENT_H_ |
| OLD | NEW |