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

Side by Side Diff: chromeos/network/shill_property_handler.h

Issue 267433005: Provide IPConfigs in networkingPrivate.GetProperties (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 7 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_NETWORK_SHILL_PROPERTY_HANDLER_H_ 5 #ifndef CHROMEOS_NETWORK_SHILL_PROPERTY_HANDLER_H_
6 #define CHROMEOS_NETWORK_SHILL_PROPERTY_HANDLER_H_ 6 #define CHROMEOS_NETWORK_SHILL_PROPERTY_HANDLER_H_
7 7
8 #include <list> 8 #include <list>
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 const std::string& service_path, 64 const std::string& service_path,
65 const std::string& key, 65 const std::string& key,
66 const base::Value& value) = 0; 66 const base::Value& value) = 0;
67 67
68 // Called when a property for a watched device has changed. 68 // Called when a property for a watched device has changed.
69 virtual void UpdateDeviceProperty( 69 virtual void UpdateDeviceProperty(
70 const std::string& device_path, 70 const std::string& device_path,
71 const std::string& key, 71 const std::string& key,
72 const base::Value& value) = 0; 72 const base::Value& value) = 0;
73 73
74 // Called when a watched network or device IPConfig property changes.
75 virtual void UpdateIPConfigProperties(
76 ManagedState::ManagedType type,
77 const std::string& path,
78 const std::string& ip_config_path,
79 const base::DictionaryValue& properties) = 0;
80
74 // Called when the list of devices with portal check enabled changes. 81 // Called when the list of devices with portal check enabled changes.
75 virtual void CheckPortalListChanged( 82 virtual void CheckPortalListChanged(
76 const std::string& check_portal_list) = 0; 83 const std::string& check_portal_list) = 0;
77 84
78 // Called when a technology list changes. 85 // Called when a technology list changes.
79 virtual void TechnologyListChanged() = 0; 86 virtual void TechnologyListChanged() = 0;
80 87
81 // Called when a managed state list has changed, after properties for any 88 // Called when a managed state list has changed, after properties for any
82 // new entries in the list have been received and 89 // new entries in the list have been received and
83 // UpdateManagedStateProperties has been called for each new entry. 90 // UpdateManagedStateProperties has been called for each new entry.
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 const std::string& path, 187 const std::string& path,
181 DBusMethodCallStatus call_status, 188 DBusMethodCallStatus call_status,
182 const base::DictionaryValue& properties); 189 const base::DictionaryValue& properties);
183 190
184 // Callback invoked when a watched property changes. Calls appropriate 191 // Callback invoked when a watched property changes. Calls appropriate
185 // handlers and signals observers. 192 // handlers and signals observers.
186 void PropertyChangedCallback(ManagedState::ManagedType type, 193 void PropertyChangedCallback(ManagedState::ManagedType type,
187 const std::string& path, 194 const std::string& path,
188 const std::string& key, 195 const std::string& key,
189 const base::Value& value); 196 const base::Value& value);
190 void NetworkServicePropertyChangedCallback(const std::string& path,
191 const std::string& key,
192 const base::Value& value);
193 197
194 // Callback for getting the IPConfig property of a Network. Handled here 198 // Request a single IPConfig object corresponding to |ip_config_path_value|
195 // instead of in NetworkState so that all asynchronous requests are done 199 // from Shill.IPConfigClient and trigger a call to UpdateIPConfigProperties
200 // for the network or device corresponding to |type| and |path|.
201 void RequestIPConfig(ManagedState::ManagedType type,
202 const std::string& path,
203 const base::Value& ip_config_path_value);
204
205 // Request the IPConfig objects corresponding to entries in
206 // |ip_config_list_value| from Shill.IPConfigClient and trigger a call to
207 // UpdateIPConfigProperties with each object for the network or device
208 // corresponding to |type| and |path|.
209 void RequestIPConfigsList(ManagedState::ManagedType type,
210 const std::string& path,
211 const base::Value& ip_config_list_value);
212
213 // Callback for getting the IPConfig property of a network or device. Handled
214 // here instead of in NetworkState so that all asynchronous requests are done
196 // in a single place (also simplifies NetworkState considerably). 215 // in a single place (also simplifies NetworkState considerably).
197 void GetIPConfigCallback(const std::string& service_path, 216 void GetIPConfigCallback(ManagedState::ManagedType type,
217 const std::string& path,
218 const std::string& ip_config_path,
198 DBusMethodCallStatus call_status, 219 DBusMethodCallStatus call_status,
199 const base::DictionaryValue& properties); 220 const base::DictionaryValue& properties);
200 void UpdateIPConfigProperty(const std::string& service_path,
201 const base::DictionaryValue& properties,
202 const char* property);
203
204 void NetworkDevicePropertyChangedCallback(const std::string& path,
205 const std::string& key,
206 const base::Value& value);
207 221
208 // Pointer to containing class (owns this) 222 // Pointer to containing class (owns this)
209 Listener* listener_; 223 Listener* listener_;
210 224
211 // Convenience pointer for ShillManagerClient 225 // Convenience pointer for ShillManagerClient
212 ShillManagerClient* shill_manager_; 226 ShillManagerClient* shill_manager_;
213 227
214 // Pending update list for each managed state type 228 // Pending update list for each managed state type
215 TypeRequestMap pending_updates_; 229 TypeRequestMap pending_updates_;
216 230
(...skipping 13 matching lines...) Expand all
230 std::set<std::string> enabling_technologies_; 244 std::set<std::string> enabling_technologies_;
231 std::set<std::string> uninitialized_technologies_; 245 std::set<std::string> uninitialized_technologies_;
232 246
233 DISALLOW_COPY_AND_ASSIGN(ShillPropertyHandler); 247 DISALLOW_COPY_AND_ASSIGN(ShillPropertyHandler);
234 }; 248 };
235 249
236 } // namespace internal 250 } // namespace internal
237 } // namespace chromeos 251 } // namespace chromeos
238 252
239 #endif // CHROMEOS_NETWORK_SHILL_PROPERTY_HANDLER_H_ 253 #endif // CHROMEOS_NETWORK_SHILL_PROPERTY_HANDLER_H_
OLDNEW
« no previous file with comments | « chromeos/network/onc/onc_translator_shill_to_onc.cc ('k') | chromeos/network/shill_property_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698