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, | 51 bool add_to_visible_list) = 0; |
52 bool add_to_watch_list) = 0; | |
53 virtual void AddServiceWithIPConfig(const std::string& service_path, | 52 virtual void AddServiceWithIPConfig(const std::string& service_path, |
54 const std::string& guid, | 53 const std::string& guid, |
55 const std::string& name, | 54 const std::string& name, |
56 const std::string& type, | 55 const std::string& type, |
57 const std::string& state, | 56 const std::string& state, |
58 const std::string& ipconfig_path, | 57 const std::string& ipconfig_path, |
59 bool add_to_visible_list, | 58 bool add_to_visible_list) = 0; |
60 bool add_to_watch_list) = 0; | |
61 | 59 |
62 // Removes a Service to the Manager and Service stubs. | 60 // Removes a Service to the Manager and Service stubs. |
63 virtual void RemoveService(const std::string& service_path) = 0; | 61 virtual void RemoveService(const std::string& service_path) = 0; |
64 | 62 |
65 // Returns false if a Service matching |service_path| does not exist. | 63 // Returns false if a Service matching |service_path| does not exist. |
66 virtual bool SetServiceProperty(const std::string& service_path, | 64 virtual bool SetServiceProperty(const std::string& service_path, |
67 const std::string& property, | 65 const std::string& property, |
68 const base::Value& value) = 0; | 66 const base::Value& value) = 0; |
69 | 67 |
70 // Returns properties for |service_path| or NULL if no Service matches. | 68 // Returns properties for |service_path| or NULL if no Service matches. |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 // Create() should be used instead. | 176 // Create() should be used instead. |
179 ShillServiceClient(); | 177 ShillServiceClient(); |
180 | 178 |
181 private: | 179 private: |
182 DISALLOW_COPY_AND_ASSIGN(ShillServiceClient); | 180 DISALLOW_COPY_AND_ASSIGN(ShillServiceClient); |
183 }; | 181 }; |
184 | 182 |
185 } // namespace chromeos | 183 } // namespace chromeos |
186 | 184 |
187 #endif // CHROMEOS_DBUS_SHILL_SERVICE_CLIENT_H_ | 185 #endif // CHROMEOS_DBUS_SHILL_SERVICE_CLIENT_H_ |
OLD | NEW |