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 #include "chromeos/network/onc/onc_translation_tables.h" | 5 #include "chromeos/network/onc/onc_translation_tables.h" |
6 | 6 |
7 #include <cstddef> | 7 #include <cstddef> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "components/onc/onc_constants.h" | 10 #include "components/onc/onc_constants.h" |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 { ::onc::wifi::kFrequencyList, shill::kWifiFrequencyListProperty}, | 112 { ::onc::wifi::kFrequencyList, shill::kWifiFrequencyListProperty}, |
113 { ::onc::wifi::kHiddenSSID, shill::kWifiHiddenSsid}, | 113 { ::onc::wifi::kHiddenSSID, shill::kWifiHiddenSsid}, |
114 { ::onc::wifi::kPassphrase, shill::kPassphraseProperty}, | 114 { ::onc::wifi::kPassphrase, shill::kPassphraseProperty}, |
115 // This field is converted during translation, see onc_translator_*. | 115 // This field is converted during translation, see onc_translator_*. |
116 // { ::onc::wifi::kSSID, shill::kWifiHexSsid}, | 116 // { ::onc::wifi::kSSID, shill::kWifiHexSsid}, |
117 // This field is converted during translation, see onc_translator_*. | 117 // This field is converted during translation, see onc_translator_*. |
118 // { ::onc::wifi::kSecurity, shill::kSecurityProperty }, | 118 // { ::onc::wifi::kSecurity, shill::kSecurityProperty }, |
119 { ::onc::wifi::kSignalStrength, shill::kSignalStrengthProperty}, | 119 { ::onc::wifi::kSignalStrength, shill::kSignalStrengthProperty}, |
120 {NULL}}; | 120 {NULL}}; |
121 | 121 |
| 122 const FieldTranslationEntry wimax_fields[] = { |
| 123 { ::onc::wimax::kAutoConnect, shill::kAutoConnectProperty}, |
| 124 { ::onc::wimax::kSignalStrength, shill::kSignalStrengthProperty}, |
| 125 {NULL}}; |
| 126 |
122 const FieldTranslationEntry cellular_apn_fields[] = { | 127 const FieldTranslationEntry cellular_apn_fields[] = { |
123 { ::onc::cellular_apn::kAccessPointName, shill::kApnProperty}, | 128 { ::onc::cellular_apn::kAccessPointName, shill::kApnProperty}, |
124 { ::onc::cellular_apn::kName, shill::kApnNameProperty}, | 129 { ::onc::cellular_apn::kName, shill::kApnNameProperty}, |
125 { ::onc::cellular_apn::kUsername, shill::kApnUsernameProperty}, | 130 { ::onc::cellular_apn::kUsername, shill::kApnUsernameProperty}, |
126 { ::onc::cellular_apn::kPassword, shill::kApnPasswordProperty}, | 131 { ::onc::cellular_apn::kPassword, shill::kApnPasswordProperty}, |
127 { ::onc::cellular_apn::kLocalizedName, shill::kApnLocalizedNameProperty}, | 132 { ::onc::cellular_apn::kLocalizedName, shill::kApnLocalizedNameProperty}, |
128 { ::onc::cellular_apn::kLanguage, shill::kApnLanguageProperty}, | 133 { ::onc::cellular_apn::kLanguage, shill::kApnLanguageProperty}, |
129 {NULL}}; | 134 {NULL}}; |
130 | 135 |
131 const FieldTranslationEntry cellular_found_network_fields[] = { | 136 const FieldTranslationEntry cellular_found_network_fields[] = { |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 const OncValueTranslationEntry onc_value_translation_table[] = { | 224 const OncValueTranslationEntry onc_value_translation_table[] = { |
220 { &kEAPSignature, eap_fields }, | 225 { &kEAPSignature, eap_fields }, |
221 { &kIPsecSignature, ipsec_fields }, | 226 { &kIPsecSignature, ipsec_fields }, |
222 { &kL2TPSignature, l2tp_fields }, | 227 { &kL2TPSignature, l2tp_fields }, |
223 { &kXAUTHSignature, xauth_fields }, | 228 { &kXAUTHSignature, xauth_fields }, |
224 { &kOpenVPNSignature, openvpn_fields }, | 229 { &kOpenVPNSignature, openvpn_fields }, |
225 { &kVerifyX509Signature, verify_x509_fields }, | 230 { &kVerifyX509Signature, verify_x509_fields }, |
226 { &kVPNSignature, vpn_fields }, | 231 { &kVPNSignature, vpn_fields }, |
227 { &kWiFiSignature, wifi_fields }, | 232 { &kWiFiSignature, wifi_fields }, |
228 { &kWiFiWithStateSignature, wifi_fields }, | 233 { &kWiFiWithStateSignature, wifi_fields }, |
| 234 { &kWiMAXSignature, wimax_fields }, |
| 235 { &kWiMAXWithStateSignature, wimax_fields }, |
229 { &kCellularApnSignature, cellular_apn_fields }, | 236 { &kCellularApnSignature, cellular_apn_fields }, |
230 { &kCellularFoundNetworkSignature, cellular_found_network_fields }, | 237 { &kCellularFoundNetworkSignature, cellular_found_network_fields }, |
231 { &kCellularProviderSignature, cellular_provider_fields }, | 238 { &kCellularProviderSignature, cellular_provider_fields }, |
232 { &kSIMLockStatusSignature, sim_lock_status_fields }, | 239 { &kSIMLockStatusSignature, sim_lock_status_fields }, |
233 { &kCellularSignature, cellular_fields }, | 240 { &kCellularSignature, cellular_fields }, |
234 { &kCellularWithStateSignature, cellular_fields }, | 241 { &kCellularWithStateSignature, cellular_fields }, |
235 { &kNetworkWithStateSignature, network_fields }, | 242 { &kNetworkWithStateSignature, network_fields }, |
236 { &kNetworkConfigurationSignature, network_fields }, | 243 { &kNetworkConfigurationSignature, network_fields }, |
237 { &kIPConfigSignature, ipconfig_fields }, | 244 { &kIPConfigSignature, ipconfig_fields }, |
238 { &kSavedIPConfigSignature, saved_ipconfig_fields }, | 245 { &kSavedIPConfigSignature, saved_ipconfig_fields }, |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
406 continue; | 413 continue; |
407 *onc_value = table[i].onc_value; | 414 *onc_value = table[i].onc_value; |
408 return true; | 415 return true; |
409 } | 416 } |
410 LOG(ERROR) << "Value '" << shill_value << "' cannot be translated to ONC"; | 417 LOG(ERROR) << "Value '" << shill_value << "' cannot be translated to ONC"; |
411 return false; | 418 return false; |
412 } | 419 } |
413 | 420 |
414 } // namespace onc | 421 } // namespace onc |
415 } // namespace chromeos | 422 } // namespace chromeos |
OLD | NEW |