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