| 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_ONC_ONC_SIGNATURE_H_ | 5 #ifndef CHROMEOS_NETWORK_ONC_ONC_SIGNATURE_H_ |
| 6 #define CHROMEOS_NETWORK_ONC_ONC_SIGNATURE_H_ | 6 #define CHROMEOS_NETWORK_ONC_ONC_SIGNATURE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/values.h" | 10 #include "base/values.h" |
| 11 #include "chromeos/chromeos_export.h" | 11 #include "chromeos/chromeos_export.h" |
| 12 | 12 |
| 13 namespace chromeos { | 13 namespace chromeos { |
| 14 namespace onc { | 14 namespace onc { |
| 15 | 15 |
| 16 struct OncValueSignature; | 16 struct OncValueSignature; |
| 17 | 17 |
| 18 struct OncFieldSignature { | 18 struct OncFieldSignature { |
| 19 const char* onc_field_name; | 19 const char* onc_field_name; |
| 20 const char* shill_property_name; | |
| 21 const OncValueSignature* value_signature; | 20 const OncValueSignature* value_signature; |
| 22 }; | 21 }; |
| 23 | 22 |
| 24 struct CHROMEOS_EXPORT OncValueSignature { | 23 struct CHROMEOS_EXPORT OncValueSignature { |
| 25 base::Value::Type onc_type; | 24 base::Value::Type onc_type; |
| 26 const OncFieldSignature* fields; | 25 const OncFieldSignature* fields; |
| 27 const OncValueSignature* onc_array_entry_signature; | 26 const OncValueSignature* onc_array_entry_signature; |
| 27 const OncValueSignature* base_signature; |
| 28 }; | 28 }; |
| 29 | 29 |
| 30 CHROMEOS_EXPORT const OncFieldSignature* GetFieldSignature( | 30 CHROMEOS_EXPORT const OncFieldSignature* GetFieldSignature( |
| 31 const OncValueSignature& signature, | 31 const OncValueSignature& signature, |
| 32 const std::string& onc_field_name); | 32 const std::string& onc_field_name); |
| 33 | 33 |
| 34 CHROMEOS_EXPORT extern const OncValueSignature kRecommendedSignature; | 34 CHROMEOS_EXPORT extern const OncValueSignature kRecommendedSignature; |
| 35 CHROMEOS_EXPORT extern const OncValueSignature kEAPSignature; | 35 CHROMEOS_EXPORT extern const OncValueSignature kEAPSignature; |
| 36 CHROMEOS_EXPORT extern const OncValueSignature kIssuerSubjectPatternSignature; | 36 CHROMEOS_EXPORT extern const OncValueSignature kIssuerSubjectPatternSignature; |
| 37 CHROMEOS_EXPORT extern const OncValueSignature kCertificatePatternSignature; | 37 CHROMEOS_EXPORT extern const OncValueSignature kCertificatePatternSignature; |
| 38 CHROMEOS_EXPORT extern const OncValueSignature kIPsecSignature; | 38 CHROMEOS_EXPORT extern const OncValueSignature kIPsecSignature; |
| 39 CHROMEOS_EXPORT extern const OncValueSignature kL2TPSignature; | 39 CHROMEOS_EXPORT extern const OncValueSignature kL2TPSignature; |
| 40 CHROMEOS_EXPORT extern const OncValueSignature kOpenVPNSignature; | 40 CHROMEOS_EXPORT extern const OncValueSignature kOpenVPNSignature; |
| 41 CHROMEOS_EXPORT extern const OncValueSignature kVPNSignature; | 41 CHROMEOS_EXPORT extern const OncValueSignature kVPNSignature; |
| 42 CHROMEOS_EXPORT extern const OncValueSignature kEthernetSignature; | 42 CHROMEOS_EXPORT extern const OncValueSignature kEthernetSignature; |
| 43 CHROMEOS_EXPORT extern const OncValueSignature kIPConfigSignature; | 43 CHROMEOS_EXPORT extern const OncValueSignature kIPConfigSignature; |
| 44 CHROMEOS_EXPORT extern const OncValueSignature kProxyLocationSignature; | 44 CHROMEOS_EXPORT extern const OncValueSignature kProxyLocationSignature; |
| 45 CHROMEOS_EXPORT extern const OncValueSignature kProxyManualSignature; | 45 CHROMEOS_EXPORT extern const OncValueSignature kProxyManualSignature; |
| 46 CHROMEOS_EXPORT extern const OncValueSignature kProxySettingsSignature; | 46 CHROMEOS_EXPORT extern const OncValueSignature kProxySettingsSignature; |
| 47 CHROMEOS_EXPORT extern const OncValueSignature kWiFiSignature; | 47 CHROMEOS_EXPORT extern const OncValueSignature kWiFiSignature; |
| 48 CHROMEOS_EXPORT extern const OncValueSignature kCellularSignature; | |
| 49 CHROMEOS_EXPORT extern const OncValueSignature kCertificateSignature; | 48 CHROMEOS_EXPORT extern const OncValueSignature kCertificateSignature; |
| 50 CHROMEOS_EXPORT extern const OncValueSignature kNetworkConfigurationSignature; | 49 CHROMEOS_EXPORT extern const OncValueSignature kNetworkConfigurationSignature; |
| 51 CHROMEOS_EXPORT extern const OncValueSignature kCertificateListSignature; | 50 CHROMEOS_EXPORT extern const OncValueSignature kCertificateListSignature; |
| 52 CHROMEOS_EXPORT extern const OncValueSignature | 51 CHROMEOS_EXPORT extern const OncValueSignature |
| 53 kNetworkConfigurationListSignature; | 52 kNetworkConfigurationListSignature; |
| 54 CHROMEOS_EXPORT extern const OncValueSignature kToplevelConfigurationSignature; | 53 CHROMEOS_EXPORT extern const OncValueSignature kToplevelConfigurationSignature; |
| 55 | 54 |
| 55 // Derived "ONC with State" signatures. |
| 56 CHROMEOS_EXPORT extern const OncValueSignature kNetworkWithStateSignature; |
| 57 CHROMEOS_EXPORT extern const OncValueSignature kWiFiWithStateSignature; |
| 58 CHROMEOS_EXPORT extern const OncValueSignature kCellularWithStateSignature; |
| 59 |
| 56 } // namespace onc | 60 } // namespace onc |
| 57 } // namespace chromeos | 61 } // namespace chromeos |
| 58 | 62 |
| 59 #endif // CHROMEOS_NETWORK_ONC_ONC_SIGNATURE_H_ | 63 #endif // CHROMEOS_NETWORK_ONC_ONC_SIGNATURE_H_ |
| OLD | NEW |