1 // Copyright 2013 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 #include "components/onc/onc_constants.h" 6 7 // Constants for ONC properties. 8 namespace onc { 9 10 const char kAugmentationActiveSetting[] = "Active"; 11 const char kAugmentationEffectiveSetting[] = "Effective"; 12 const char kAugmentationUnmanaged[] = "Unmanaged"; 13 const char kAugmentationUserPolicy[] = "UserPolicy"; 14 const char kAugmentationDevicePolicy[] = "DevicePolicy"; 15 const char kAugmentationUserSetting[] = "UserSetting"; 16 const char kAugmentationSharedSetting[] = "SharedSetting"; 17 const char kAugmentationUserEditable[] = "UserEditable"; 18 const char kAugmentationDeviceEditable[] = "DeviceEditable"; 19 20 // Common keys/values. 21 const char kRecommended[] = "Recommended"; 22 const char kRemove[] = "Remove"; 23 24 // Top Level Configuration 25 namespace toplevel_config { 26 const char kCertificates[] = "Certificates"; 27 const char kEncryptedConfiguration[] = "EncryptedConfiguration"; 28 const char kNetworkConfigurations[] = "NetworkConfigurations"; 29 const char kGlobalNetworkConfiguration[] = "GlobalNetworkConfiguration"; 30 const char kType[] = "Type"; 31 const char kUnencryptedConfiguration[] = "UnencryptedConfiguration"; 32 } // namespace toplevel_config 33 34 // Network Configuration 35 namespace network_config { 36 const char kCellular[] = "Cellular"; 37 const char kDevice[] = "Device"; 38 const char kEthernet[] = "Ethernet"; 39 const char kGUID[] = "GUID"; 40 const char kIPConfigs[] = "IPConfigs"; 41 const char kMacAddress[] = "MacAddress"; 42 const char kName[] = "Name"; 43 const char kNameServers[] = "NameServers"; 44 const char kProxySettings[] = "ProxySettings"; 45 const char kSearchDomains[] = "SearchDomains"; 46 const char kConnectionState[] = "ConnectionState"; 47 const char kConnectable[] = "Connectable"; 48 const char kErrorState[] = "ErrorState"; 49 const char kType[] = "Type"; 50 const char kVPN[] = "VPN"; 51 const char kWiFi[] = "WiFi"; 52 CellularProperty(const std::string & property)53std::string CellularProperty(const std::string& property) { 54 return std::string(kCellular) + "." + property; 55 } 56 VpnProperty(const std::string & property)57std::string VpnProperty(const std::string& property) { 58 return std::string(kVPN) + "." + property; 59 } 60 WifiProperty(const std::string & property)61std::string WifiProperty(const std::string& property) { 62 return std::string(kWiFi) + "." + property; 63 } 64 65 } // namespace network_config 66 67 namespace network_type { 68 const char kAllTypes[] = "All"; 69 const char kCellular[] = "Cellular"; 70 const char kEthernet[] = "Ethernet"; 71 const char kVPN[] = "VPN"; 72 const char kWiFi[] = "WiFi"; 73 const char kWimax[] = "Wimax"; 74 const char kWireless[] = "Wireless"; 75 } // namespace network_type 76 77 namespace cellular { 78 const char kActivateOverNonCellularNetwork[] = "ActivateOverNonCellularNetwork"; 79 const char kActivationState[] = "ActivationState"; 80 const char kAllowRoaming[] = "AllowRoaming"; 81 const char kAPN[] = "APN"; 82 const char kAPNList[] = "APNList"; 83 const char kCarrier[] = "Carrier"; 84 const char kESN[] = "ESN"; 85 const char kFamily[] = "Family"; 86 const char kFirmwareRevision[] = "FirmwareRevision"; 87 const char kFoundNetworks[] = "FoundNetworks"; 88 const char kHardwareRevision[] = "HardwareRevision"; 89 const char kHomeProvider[] = "HomeProvider"; 90 const char kICCID[] = "ICCID"; 91 const char kIMEI[] = "IMEI"; 92 const char kIMSI[] = "IMSI"; 93 const char kManufacturer[] = "Manufacturer"; 94 const char kMDN[] = "MDN"; 95 const char kMEID[] = "MEID"; 96 const char kMIN[] = "MIN"; 97 const char kModelID[] = "ModelID"; 98 const char kNetworkTechnology[] = "NetworkTechnology"; 99 const char kPRLVersion[] = "PRLVersion"; 100 const char kProviderRequiresRoaming[] = "ProviderRequiresRoaming"; 101 const char kRoamingState[] = "RoamingState"; 102 const char kSelectedNetwork[] = "SelectedNetwork"; 103 const char kServingOperator[] = "ServingOperator"; 104 const char kSIMLockEnabled[] = "SIMLockEnabled"; 105 const char kSIMLockStatus[] = "SIMLockStatus"; 106 const char kSIMLockType[] = "SIMLockType"; 107 const char kSIMPresent[] = "SIMPresent"; 108 const char kSupportedCarriers[] = "SupportedCarriers"; 109 const char kSupportNetworkScan[] = "SupportNetworkScan"; 110 } // namespace cellular 111 112 namespace cellular_provider { 113 const char kCode[] = "Code"; 114 const char kCountry[] = "Country"; 115 const char kName[] = "Name"; 116 } // namespace cellular_provider 117 118 namespace cellular_apn { 119 const char kName[] = "Name"; 120 const char kUsername[] = "Username"; 121 const char kPassword[] = "Password"; 122 } // namespace cellular_apn 123 124 namespace connection_state { 125 const char kConnected[] = "Connected"; 126 const char kConnecting[] = "Connecting"; 127 const char kNotConnected[] = "NotConnected"; 128 } // namespace connection_state 129 130 namespace ethernet { 131 const char kAuthentication[] = "Authentication"; 132 const char kEAP[] = "EAP"; 133 const char kNone[] = "None"; 134 const char k8021X[] = "8021X"; 135 } // namespace ethernet 136 137 namespace ipconfig { 138 const char kGateway[] = "Gateway"; 139 const char kIPAddress[] = "IPAddress"; 140 const char kIPv4[] = "IPv4"; 141 const char kIPv6[] = "IPv6"; 142 const char kNameServers[] = "NameServers"; 143 const char kRoutingPrefix[] = "RoutingPrefix"; 144 const char kType[] = "Type"; 145 } // namespace ipconfig 146 147 namespace wifi { 148 const char kAutoConnect[] = "AutoConnect"; 149 const char kBSSID[] = "BSSID"; 150 const char kEAP[] = "EAP"; 151 const char kFrequency[] = "Frequency"; 152 const char kFrequencyList[] = "FrequencyList"; 153 const char kHiddenSSID[] = "HiddenSSID"; 154 const char kNone[] = "None"; 155 const char kPassphrase[] = "Passphrase"; 156 const char kProxyURL[] = "ProxyURL"; 157 const char kSSID[] = "SSID"; 158 const char kSecurity[] = "Security"; 159 const char kSignalStrength[] = "SignalStrength"; 160 const char kWEP_8021X[] = "WEP-8021X"; 161 const char kWEP_PSK[] = "WEP-PSK"; 162 const char kWPA_EAP[] = "WPA-EAP"; 163 const char kWPA_PSK[] = "WPA-PSK"; 164 const char kWPA2_PSK[] = "WPA2-PSK"; 165 } // namespace wifi 166 167 namespace certificate { 168 const char kAuthority[] = "Authority"; 169 const char kClient[] = "Client"; 170 const char kCommonName[] = "CommonName"; 171 const char kEmailAddress[] = "EmailAddress"; 172 const char kEnrollmentURI[] = "EnrollmentURI"; 173 const char kGUID[] = "GUID"; 174 const char kIssuerCARef[] = "IssuerCARef"; 175 const char kIssuerCAPEMs[] = "IssuerCAPEMs"; 176 const char kIssuer[] = "Issuer"; 177 const char kLocality[] = "Locality"; 178 const char kNone[] = "None"; 179 const char kOrganization[] = "Organization"; 180 const char kOrganizationalUnit[] = "OrganizationalUnit"; 181 const char kPKCS12[] = "PKCS12"; 182 const char kPattern[] = "Pattern"; 183 const char kRef[] = "Ref"; 184 const char kServer[] = "Server"; 185 const char kSubject[] = "Subject"; 186 const char kTrustBits[] = "TrustBits"; 187 const char kType[] = "Type"; 188 const char kWeb[] = "Web"; 189 const char kX509[] = "X509"; 190 } // namespace certificate 191 192 namespace encrypted { 193 const char kAES256[] = "AES256"; 194 const char kCipher[] = "Cipher"; 195 const char kCiphertext[] = "Ciphertext"; 196 const char kHMACMethod[] = "HMACMethod"; 197 const char kHMAC[] = "HMAC"; 198 const char kIV[] = "IV"; 199 const char kIterations[] = "Iterations"; 200 const char kPBKDF2[] = "PBKDF2"; 201 const char kSHA1[] = "SHA1"; 202 const char kSalt[] = "Salt"; 203 const char kStretch[] = "Stretch"; 204 } // namespace encrypted 205 206 namespace eap { 207 const char kAnonymousIdentity[] = "AnonymousIdentity"; 208 const char kAutomatic[] = "Automatic"; 209 const char kClientCertPattern[] = "ClientCertPattern"; 210 const char kClientCertRef[] = "ClientCertRef"; 211 const char kClientCertType[] = "ClientCertType"; 212 const char kEAP_AKA[] = "EAP-AKA"; 213 const char kEAP_FAST[] = "EAP-FAST"; 214 const char kEAP_SIM[] = "EAP-SIM"; 215 const char kEAP_TLS[] = "EAP-TLS"; 216 const char kEAP_TTLS[] = "EAP-TTLS"; 217 const char kIdentity[] = "Identity"; 218 const char kInner[] = "Inner"; 219 const char kLEAP[] = "LEAP"; 220 const char kMD5[] = "MD5"; 221 const char kMSCHAPv2[] = "MSCHAPv2"; 222 const char kOuter[] = "Outer"; 223 const char kPAP[] = "PAP"; 224 const char kPEAP[] = "PEAP"; 225 const char kPassword[] = "Password"; 226 const char kSaveCredentials[] = "SaveCredentials"; 227 const char kServerCAPEMs[] = "ServerCAPEMs"; 228 const char kServerCARef[] = "ServerCARef"; 229 const char kServerCARefs[] = "ServerCARefs"; 230 const char kUseSystemCAs[] = "UseSystemCAs"; 231 } // namespace eap 232 233 namespace vpn { 234 const char kAutoConnect[] = "AutoConnect"; 235 const char kClientCertPattern[] = "ClientCertPattern"; 236 const char kClientCertRef[] = "ClientCertRef"; 237 const char kClientCertType[] = "ClientCertType"; 238 const char kHost[] = "Host"; 239 const char kIPsec[] = "IPsec"; 240 const char kL2TP[] = "L2TP"; 241 const char kOpenVPN[] = "OpenVPN"; 242 const char kPassword[] = "Password"; 243 const char kSaveCredentials[] = "SaveCredentials"; 244 const char kTypeL2TP_IPsec[] = "L2TP-IPsec"; 245 const char kType[] = "Type"; 246 const char kUsername[] = "Username"; 247 } // namespace vpn 248 249 namespace ipsec { 250 const char kAuthenticationType[] = "AuthenticationType"; 251 const char kCert[] = "Cert"; 252 const char kEAP[] = "EAP"; 253 const char kGroup[] = "Group"; 254 const char kIKEVersion[] = "IKEVersion"; 255 const char kPSK[] = "PSK"; 256 const char kServerCAPEMs[] = "ServerCAPEMs"; 257 const char kServerCARef[] = "ServerCARef"; 258 const char kServerCARefs[] = "ServerCARefs"; 259 const char kXAUTH[] = "XAUTH"; 260 } // namespace ipsec 261 262 namespace openvpn { 263 const char kAuthNoCache[] = "AuthNoCache"; 264 const char kAuthRetry[] = "AuthRetry"; 265 const char kAuth[] = "Auth"; 266 const char kCipher[] = "Cipher"; 267 const char kCompLZO[] = "CompLZO"; 268 const char kCompNoAdapt[] = "CompNoAdapt"; 269 const char kIgnoreDefaultRoute[] = "IgnoreDefaultRoute"; 270 const char kInteract[] = "interact"; 271 const char kKeyDirection[] = "KeyDirection"; 272 const char kNoInteract[] = "nointeract"; 273 const char kNone[] = "none"; 274 const char kNsCertType[] = "NsCertType"; 275 const char kPort[] = "Port"; 276 const char kProto[] = "Proto"; 277 const char kPushPeerInfo[] = "PushPeerInfo"; 278 const char kRemoteCertEKU[] = "RemoteCertEKU"; 279 const char kRemoteCertKU[] = "RemoteCertKU"; 280 const char kRemoteCertTLS[] = "RemoteCertTLS"; 281 const char kRenegSec[] = "RenegSec"; 282 const char kServerCAPEMs[] = "ServerCAPEMs"; 283 const char kServerCARef[] = "ServerCARef"; 284 const char kServerCARefs[] = "ServerCARefs"; 285 const char kServerCertPEM[] = "ServerCertPEM"; 286 const char kServerCertRef[] = "ServerCertRef"; 287 const char kServerPollTimeout[] = "ServerPollTimeout"; 288 const char kServer[] = "server"; 289 const char kShaper[] = "Shaper"; 290 const char kStaticChallenge[] = "StaticChallenge"; 291 const char kTLSAuthContents[] = "TLSAuthContents"; 292 const char kTLSRemote[] = "TLSRemote"; 293 const char kVerb[] = "Verb"; 294 const char kVerifyHash[] = "VerifyHash"; 295 const char kVerifyX509[] = "VerifyX509"; 296 } // namespace openvpn 297 298 namespace verify_x509 { 299 const char kName[] = "Name"; 300 const char kType[] = "Type"; 301 302 namespace types { 303 const char kName[] = "name"; 304 const char kNamePrefix[] = "name-prefix"; 305 const char kSubject[] = "subject"; 306 } // namespace types 307 } // namespace verify_x509 308 309 namespace proxy { 310 const char kDirect[] = "Direct"; 311 const char kExcludeDomains[] = "ExcludeDomains"; 312 const char kFtp[] = "FTPProxy"; 313 const char kHost[] = "Host"; 314 const char kHttp[] = "HTTPProxy"; 315 const char kHttps[] = "SecureHTTPProxy"; 316 const char kManual[] = "Manual"; 317 const char kPAC[] = "PAC"; 318 const char kPort[] = "Port"; 319 const char kSocks[] = "SOCKS"; 320 const char kType[] = "Type"; 321 const char kWPAD[] = "WPAD"; 322 } // namespace proxy 323 324 namespace substitutes { 325 const char kLoginIDField[] = "${LOGIN_ID}"; 326 const char kEmailField[] = "${LOGIN_EMAIL}"; 327 } // namespace substitutes 328 329 namespace global_network_config { 330 const char kAllowOnlyPolicyNetworksToAutoconnect[] = 331 "AllowOnlyPolicyNetworksToAutoconnect"; 332 } // global_network_config 333 334 } // namespace onc 335