Chromium Code Reviews| Index: chromeos/network/onc/onc_signature.cc |
| diff --git a/chromeos/network/onc/onc_signature.cc b/chromeos/network/onc/onc_signature.cc |
| index 1603c578b6766bd47815dc2f342850aaf9374938..7a9408cebbc23979c830650ac1fa29615233840c 100644 |
| --- a/chromeos/network/onc/onc_signature.cc |
| +++ b/chromeos/network/onc/onc_signature.cc |
| @@ -169,9 +169,9 @@ const OncFieldSignature ethernet_fields[] = { |
| const OncFieldSignature ipconfig_fields[] = { |
| { ipconfig::kGateway, NULL, &kStringSignature }, |
| { ipconfig::kIPAddress, NULL, &kStringSignature }, |
| - { kNameServers, NULL, &kStringSignature }, |
| + { network_config::kNameServers, NULL, &kStringSignature }, |
| { ipconfig::kRoutingPrefix, NULL, &kIntegerSignature }, |
| - { kSearchDomains, NULL, &kStringListSignature }, |
| + { network_config::kSearchDomains, NULL, &kStringListSignature }, |
| { ipconfig::kType, NULL, &kStringSignature }, |
| { NULL } |
| }; |
| @@ -204,6 +204,7 @@ const OncFieldSignature proxy_settings_fields[] = { |
| const OncFieldSignature wifi_fields[] = { |
| { kRecommended, NULL, &kRecommendedSignature }, |
| { wifi::kAutoConnect, flimflam::kAutoConnectProperty, &kBoolSignature }, |
| + { wifi::kBSSID, flimflam::kWifiBSsid, &kStringSignature }, |
|
pneubeck (no reviews)
2013/01/21 09:26:40
the BSSID should be read-only (according to shill'
Greg Spencer (Chromium)
2013/01/22 19:10:54
Done.
|
| { wifi::kEAP, NULL, &kEAPSignature }, |
| { wifi::kHiddenSSID, flimflam::kWifiHiddenSsid, &kBoolSignature }, |
| { wifi::kPassphrase, flimflam::kPassphraseProperty, &kStringSignature }, |
| @@ -213,31 +214,89 @@ const OncFieldSignature wifi_fields[] = { |
| { NULL } |
| }; |
| +const OncFieldSignature cellular_fields[] = { |
| + { kRecommended, NULL, &kRecommendedSignature }, |
| + { cellular::kActivateOverNonCellularNetwork, |
| + shill::kActivateOverNonCellularNetworkProperty, &kStringSignature }, |
| + { cellular::kActivationState, |
| + flimflam::kActivationStateProperty, &kStringSignature }, |
| + { cellular::kAllowRoaming, |
| + flimflam::kCellularAllowRoamingProperty, &kStringSignature }, |
| + { cellular::kAPN, flimflam::kApnProperty, &kStringSignature }, |
| + { cellular::kCarrier, flimflam::kCarrierProperty, &kStringSignature }, |
| + { cellular::kESN, flimflam::kEsnProperty, &kStringSignature }, |
| + { cellular::kFamily, flimflam::kTechnologyFamilyProperty, &kStringSignature }, |
| + { cellular::kFirmwareRevision, |
| + flimflam::kFirmwareRevisionProperty, &kStringSignature }, |
| + { cellular::kFoundNetworks, |
| + flimflam::kFoundNetworksProperty, &kStringSignature }, |
| + { cellular::kHardwareRevision, |
| + flimflam::kHardwareRevisionProperty, &kStringSignature }, |
| + { cellular::kHomeProvider, |
| + flimflam::kHomeProviderProperty, &kStringSignature }, |
| + { cellular::kICCID, flimflam::kIccidProperty, &kStringSignature }, |
| + { cellular::kIMEI, flimflam::kImeiProperty, &kStringSignature }, |
| + { cellular::kIMSI, flimflam::kImsiProperty, &kStringSignature }, |
| + { cellular::kManufacturer, |
| + flimflam::kManufacturerProperty, &kStringSignature }, |
| + { cellular::kMDN, flimflam::kMdnProperty, &kStringSignature }, |
| + { cellular::kMEID, flimflam::kMeidProperty, &kStringSignature }, |
| + { cellular::kMIN, flimflam::kMinProperty, &kStringSignature }, |
| + { cellular::kModelID, flimflam::kModelIDProperty, &kStringSignature }, |
| + { cellular::kNetworkTechnology, |
| + flimflam::kNetworkTechnologyProperty, &kStringSignature }, |
| + { cellular::kOperatorCode, |
| + flimflam::kOperatorCodeProperty, &kStringSignature }, |
| + { cellular::kOperatorName, |
| + flimflam::kOperatorNameProperty, &kStringSignature }, |
| + { cellular::kPRLVersion, flimflam::kPRLVersionProperty, &kStringSignature }, |
| + { cellular::kProviderRequiresRoaming, |
| + shill::kProviderRequiresRoamingProperty, &kStringSignature }, |
| + { cellular::kRoamingState, |
| + flimflam::kRoamingStateProperty, &kStringSignature }, |
| + { cellular::kSelectedNetwork, |
| + flimflam::kSelectedNetworkProperty, &kStringSignature }, |
| + { cellular::kServingOperator, |
| + flimflam::kServingOperatorProperty, &kStringSignature }, |
| + { cellular::kSIMLockStatus, |
| + flimflam::kSIMLockStatusProperty, &kStringSignature }, |
| + { cellular::kSIMPresent, shill::kSIMPresentProperty, &kStringSignature }, |
| + { cellular::kSupportedCarriers, |
| + shill::kSupportedCarriersProperty, &kStringSignature }, |
| + { cellular::kSupportNetworkScan, |
| + flimflam::kSupportNetworkScanProperty, &kStringSignature }, |
| + { NULL } |
| +}; |
| + |
| const OncFieldSignature network_configuration_fields[] = { |
| { kRecommended, NULL, &kRecommendedSignature }, |
| - { kEthernet, NULL, &kEthernetSignature }, |
| - { kGUID, flimflam::kGuidProperty, &kStringSignature }, |
| - { kIPConfigs, NULL, &kIPConfigListSignature }, |
| + { network_config::kEthernet, NULL, &kEthernetSignature }, |
| + { network_config::kGUID, flimflam::kGuidProperty, &kStringSignature }, |
| + { network_config::kIPConfigs, NULL, &kIPConfigListSignature }, |
| // Shill doesn't allow setting the name for non-VPN networks. |
| // This field is conditionally translated, see onc_translator_*. |
| - { kName, NULL, &kStringSignature }, |
| + { network_config::kName, NULL, &kStringSignature }, |
| // Not supported, yet. |
| - { kNameServers, NULL, &kStringListSignature }, |
| - { kProxySettings, NULL, &kProxySettingsSignature }, |
| + { network_config::kNameServers, NULL, &kStringListSignature }, |
| + { network_config::kProxySettings, NULL, &kProxySettingsSignature }, |
| // No need to translate. |
| { kRemove, NULL, &kBoolSignature }, |
| // Not supported, yet. |
| - { kSearchDomains, NULL, &kStringListSignature }, |
| + { network_config::kSearchDomains, NULL, &kStringListSignature }, |
| + // This field is converted during translation, see onc_translator_*. |
| + { network_config::kType, NULL, &kStringSignature }, |
| + { network_config::kVPN, NULL, &kVPNSignature }, |
| + { network_config::kWiFi, NULL, &kWiFiSignature }, |
| + { network_config::kCellular, NULL, &kCellularSignature }, |
| // This field is converted during translation, see onc_translator_*. |
| - { kType, NULL, &kStringSignature }, |
| - { kVPN, NULL, &kVPNSignature }, |
| - { kWiFi, NULL, &kWiFiSignature }, |
| + // It is only converted when going from Shill->ONC, and ignored otherwise. |
| + { network_config::kState, NULL, &kStringSignature}, |
| { NULL } |
| }; |
| // Certificates are not translated to Shill. |
| const OncFieldSignature certificate_fields[] = { |
| - { kGUID, NULL, &kStringSignature }, |
| + { certificate::kGUID, NULL, &kStringSignature }, |
| { certificate::kPKCS12, NULL, &kStringSignature }, |
| { kRemove, NULL, &kBoolSignature }, |
| { certificate::kTrust, NULL, &kStringListSignature }, |
| @@ -247,9 +306,10 @@ const OncFieldSignature certificate_fields[] = { |
| }; |
| const OncFieldSignature toplevel_configuration_fields[] = { |
| - { kCertificates, NULL, &kCertificateListSignature }, |
| - { kNetworkConfigurations, NULL, &kNetworkConfigurationListSignature }, |
| - { kType, NULL, &kStringSignature }, |
| + { toplevel_config::kCertificates, NULL, &kCertificateListSignature }, |
| + { toplevel_config::kNetworkConfigurations, NULL, |
| + &kNetworkConfigurationListSignature }, |
| + { toplevel_config::kType, NULL, &kStringSignature }, |
| { encrypted::kCipher, NULL, &kStringSignature }, |
| { encrypted::kCiphertext, NULL, &kStringSignature }, |
| { encrypted::kHMAC, NULL, &kStringSignature }, |
| @@ -305,6 +365,9 @@ const OncValueSignature kProxySettingsSignature = { |
| const OncValueSignature kWiFiSignature = { |
| Value::TYPE_DICTIONARY, wifi_fields, NULL |
| }; |
| +const OncValueSignature kCellularSignature = { |
| + Value::TYPE_DICTIONARY, cellular_fields, NULL |
| +}; |
| const OncValueSignature kCertificateSignature = { |
| Value::TYPE_DICTIONARY, certificate_fields, NULL |
| }; |