| 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 CHROME_BROWSER_CHROMEOS_CROS_CROS_NETWORK_FUNCTIONS_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_CROS_CROS_NETWORK_FUNCTIONS_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_CROS_CROS_NETWORK_FUNCTIONS_H_ | 6 #define CHROME_BROWSER_CHROMEOS_CROS_CROS_NETWORK_FUNCTIONS_H_ |
| 7 | 7 |
| 8 // This header is introduced to make it easy to switch from chromeos_network.cc | 8 // This header is introduced to make it easy to switch from chromeos_network.cc |
| 9 // to Chrome's own DBus code. crosbug.com/16557 | 9 // to Chrome's own DBus code. crosbug.com/16557 |
| 10 // All calls to functions in chromeos_network.h should be made through | 10 // All calls to functions in chromeos_network.h should be made through |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 const base::Value& value); | 131 const base::Value& value); |
| 132 | 132 |
| 133 // Deletes a remembered service from a profile. | 133 // Deletes a remembered service from a profile. |
| 134 void CrosDeleteServiceFromProfile(const std::string& profile_path, | 134 void CrosDeleteServiceFromProfile(const std::string& profile_path, |
| 135 const std::string& service_path); | 135 const std::string& service_path); |
| 136 | 136 |
| 137 // Requests an update of the data plans. A callback will be received by any | 137 // Requests an update of the data plans. A callback will be received by any |
| 138 // object that invoked MonitorCellularDataPlan when up to date data is ready. | 138 // object that invoked MonitorCellularDataPlan when up to date data is ready. |
| 139 void CrosRequestCellularDataPlanUpdate(const std::string& modem_service_path); | 139 void CrosRequestCellularDataPlanUpdate(const std::string& modem_service_path); |
| 140 | 140 |
| 141 // Sets up monitoring of the PropertyChanged signal on the flimflam manager. | 141 // Sets up monitoring of the PropertyChanged signal on the shill manager. |
| 142 // The provided |callback| will be called whenever a manager property changes. | 142 // The provided |callback| will be called whenever a manager property changes. |
| 143 CrosNetworkWatcher* CrosMonitorNetworkManagerProperties( | 143 CrosNetworkWatcher* CrosMonitorNetworkManagerProperties( |
| 144 const NetworkPropertiesWatcherCallback& callback); | 144 const NetworkPropertiesWatcherCallback& callback); |
| 145 | 145 |
| 146 // Similar to MonitorNetworkManagerProperties for a specified network service. | 146 // Similar to MonitorNetworkManagerProperties for a specified network service. |
| 147 CrosNetworkWatcher* CrosMonitorNetworkServiceProperties( | 147 CrosNetworkWatcher* CrosMonitorNetworkServiceProperties( |
| 148 const NetworkPropertiesWatcherCallback& callback, | 148 const NetworkPropertiesWatcherCallback& callback, |
| 149 const std::string& service_path); | 149 const std::string& service_path); |
| 150 | 150 |
| 151 // Similar to MonitorNetworkManagerProperties for a specified network device. | 151 // Similar to MonitorNetworkManagerProperties for a specified network device. |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 const std::string& provider_type, | 208 const std::string& provider_type, |
| 209 const NetworkPropertiesCallback& callback); | 209 const NetworkPropertiesCallback& callback); |
| 210 | 210 |
| 211 // Disconnects from network service asynchronously. | 211 // Disconnects from network service asynchronously. |
| 212 void CrosRequestNetworkServiceDisconnect(const std::string& service_path); | 212 void CrosRequestNetworkServiceDisconnect(const std::string& service_path); |
| 213 | 213 |
| 214 // Removes an exisiting network service (e.g. after forgetting a VPN). | 214 // Removes an exisiting network service (e.g. after forgetting a VPN). |
| 215 void CrosRequestRemoveNetworkService(const std::string& service_path); | 215 void CrosRequestRemoveNetworkService(const std::string& service_path); |
| 216 | 216 |
| 217 // Requests a scan of services of |type|. | 217 // Requests a scan of services of |type|. |
| 218 // |type| should be is a string recognized by flimflam's Manager API. | 218 // |type| should be is a string recognized by shill's Manager API. |
| 219 void CrosRequestNetworkScan(const std::string& network_type); | 219 void CrosRequestNetworkScan(const std::string& network_type); |
| 220 | 220 |
| 221 // Requests enabling or disabling a device. | 221 // Requests enabling or disabling a device. |
| 222 void CrosRequestNetworkDeviceEnable(const std::string& network_type, | 222 void CrosRequestNetworkDeviceEnable(const std::string& network_type, |
| 223 bool enable); | 223 bool enable); |
| 224 | 224 |
| 225 // Enables or disables PIN protection for a SIM card. | 225 // Enables or disables PIN protection for a SIM card. |
| 226 void CrosRequestRequirePin(const std::string& device_path, | 226 void CrosRequestRequirePin(const std::string& device_path, |
| 227 const std::string& pin, | 227 const std::string& pin, |
| 228 bool enable, | 228 bool enable, |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 298 // Invalid prefix lengths will return the empty string. | 298 // Invalid prefix lengths will return the empty string. |
| 299 std::string CrosPrefixLengthToNetmask(int32 prefix_length); | 299 std::string CrosPrefixLengthToNetmask(int32 prefix_length); |
| 300 | 300 |
| 301 // Converts a |netmask| to a prefixlen. (for IPv4 only) | 301 // Converts a |netmask| to a prefixlen. (for IPv4 only) |
| 302 // e.g. a |netmask| of 255.255.255.0 is converted to a prefixlen of 24 | 302 // e.g. a |netmask| of 255.255.255.0 is converted to a prefixlen of 24 |
| 303 int32 CrosNetmaskToPrefixLength(const std::string& netmask); | 303 int32 CrosNetmaskToPrefixLength(const std::string& netmask); |
| 304 | 304 |
| 305 } // namespace chromeos | 305 } // namespace chromeos |
| 306 | 306 |
| 307 #endif // CHROME_BROWSER_CHROMEOS_CROS_CROS_NETWORK_FUNCTIONS_H_ | 307 #endif // CHROME_BROWSER_CHROMEOS_CROS_CROS_NETWORK_FUNCTIONS_H_ |
| OLD | NEW |