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_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 Loading... |
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 UpdateIPConfigProperites( |
| 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 Loading... |
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 property from Shill.IPConfigClient. |
195 // instead of in NetworkState so that all asynchronous requests are done | 199 void RequestIPConfig(ManagedState::ManagedType type, |
| 200 const std::string& path, |
| 201 const base::Value& value); |
| 202 |
| 203 // Request a list IPConfig properties from Shill.IPConfigClient. |
| 204 void RequestIPConfigsList(ManagedState::ManagedType type, |
| 205 const std::string& path, |
| 206 const base::Value& value); |
| 207 |
| 208 // Callback for getting the IPConfig property of a network or device. Handled |
| 209 // here instead of in NetworkState so that all asynchronous requests are done |
196 // in a single place (also simplifies NetworkState considerably). | 210 // in a single place (also simplifies NetworkState considerably). |
197 void GetIPConfigCallback(const std::string& service_path, | 211 void GetIPConfigCallback(ManagedState::ManagedType type, |
| 212 const std::string& path, |
| 213 const std::string& ip_config_path, |
198 DBusMethodCallStatus call_status, | 214 DBusMethodCallStatus call_status, |
199 const base::DictionaryValue& properties); | 215 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 | 216 |
208 // Pointer to containing class (owns this) | 217 // Pointer to containing class (owns this) |
209 Listener* listener_; | 218 Listener* listener_; |
210 | 219 |
211 // Convenience pointer for ShillManagerClient | 220 // Convenience pointer for ShillManagerClient |
212 ShillManagerClient* shill_manager_; | 221 ShillManagerClient* shill_manager_; |
213 | 222 |
214 // Pending update list for each managed state type | 223 // Pending update list for each managed state type |
215 TypeRequestMap pending_updates_; | 224 TypeRequestMap pending_updates_; |
216 | 225 |
(...skipping 13 matching lines...) Expand all Loading... |
230 std::set<std::string> enabling_technologies_; | 239 std::set<std::string> enabling_technologies_; |
231 std::set<std::string> uninitialized_technologies_; | 240 std::set<std::string> uninitialized_technologies_; |
232 | 241 |
233 DISALLOW_COPY_AND_ASSIGN(ShillPropertyHandler); | 242 DISALLOW_COPY_AND_ASSIGN(ShillPropertyHandler); |
234 }; | 243 }; |
235 | 244 |
236 } // namespace internal | 245 } // namespace internal |
237 } // namespace chromeos | 246 } // namespace chromeos |
238 | 247 |
239 #endif // CHROMEOS_NETWORK_SHILL_PROPERTY_HANDLER_H_ | 248 #endif // CHROMEOS_NETWORK_SHILL_PROPERTY_HANDLER_H_ |
OLD | NEW |