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

Side by Side Diff: chromeos/dbus/shill_service_client.h

Issue 330833003: Rely on Service.Visible instead of Manager.Services (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sort services when updated, add test Created 6 years, 6 months 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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.
pneubeck (no reviews) 2014/06/17 15:30:33 for clarification, maybe add a sentence: "Afterwar
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
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698