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..37b4cc02ca3cf950ff0cbad5ef08a0dbe2b13bd4 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 }, |
{ wifi::kEAP, NULL, &kEAPSignature }, |
{ wifi::kHiddenSSID, flimflam::kWifiHiddenSsid, &kBoolSignature }, |
{ wifi::kPassphrase, flimflam::kPassphraseProperty, &kStringSignature }, |
@@ -213,31 +214,88 @@ const OncFieldSignature wifi_fields[] = { |
{ NULL } |
}; |
+const OncFieldSignature cellular_fields[] = { |
pneubeck (no reviews)
2013/01/18 10:27:41
We'll need documentation for these fields. I'll se
Greg Spencer (Chromium)
2013/01/18 22:27:44
OK. I think almost all of them are read-only fiel
|
+ { 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_*. |
pneubeck (no reviews)
2013/01/18 10:27:41
mention that it is read-only and/or converted only
Greg Spencer (Chromium)
2013/01/18 22:27:44
Done.
|
- { kType, NULL, &kStringSignature }, |
- { kVPN, NULL, &kVPNSignature }, |
- { kWiFi, NULL, &kWiFiSignature }, |
+ { network_config::kState, NULL, &kStringSignature}, |
{ NULL } |
}; |
// Certificates are not translated to Shill. |
const OncFieldSignature certificate_fields[] = { |
- { kGUID, NULL, &kStringSignature }, |
+ { network_config::kGUID, NULL, &kStringSignature }, |
pneubeck (no reviews)
2013/01/18 10:27:41
(onc::)kGUID
Greg Spencer (Chromium)
2013/01/18 22:27:44
Changed to certificate::kGUID.
|
{ certificate::kPKCS12, NULL, &kStringSignature }, |
{ kRemove, NULL, &kBoolSignature }, |
{ certificate::kTrust, NULL, &kStringListSignature }, |
@@ -249,7 +307,7 @@ const OncFieldSignature certificate_fields[] = { |
const OncFieldSignature toplevel_configuration_fields[] = { |
{ kCertificates, NULL, &kCertificateListSignature }, |
{ kNetworkConfigurations, NULL, &kNetworkConfigurationListSignature }, |
- { kType, NULL, &kStringSignature }, |
+ { encrypted::kType, NULL, &kStringSignature }, |
pneubeck (no reviews)
2013/01/18 10:27:41
toplevel_config::kType
Greg Spencer (Chromium)
2013/01/18 22:27:44
Done.
|
{ encrypted::kCipher, NULL, &kStringSignature }, |
{ encrypted::kCiphertext, NULL, &kStringSignature }, |
{ encrypted::kHMAC, NULL, &kStringSignature }, |
@@ -305,6 +363,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 |
}; |