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.
5 #include "components/onc/onc_constants.h"
7 // Constants for ONC properties.
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";
20 // Common keys/values.
21 const char kRecommended
[] = "Recommended";
22 const char kRemove
[] = "Remove";
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
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 kPriority
[] = "Priority";
45 const char kProxySettings
[] = "ProxySettings";
46 const char kSearchDomains
[] = "SearchDomains";
47 const char kConnectionState
[] = "ConnectionState";
48 const char kConnectable
[] = "Connectable";
49 const char kErrorState
[] = "ErrorState";
50 const char kType
[] = "Type";
51 const char kVPN
[] = "VPN";
52 const char kWiFi
[] = "WiFi";
54 std::string
CellularProperty(const std::string
& property
) {
55 return std::string(kCellular
) + "." + property
;
58 std::string
VpnProperty(const std::string
& property
) {
59 return std::string(kVPN
) + "." + property
;
62 std::string
WifiProperty(const std::string
& property
) {
63 return std::string(kWiFi
) + "." + property
;
66 } // namespace network_config
68 namespace network_type
{
69 const char kAllTypes
[] = "All";
70 const char kCellular
[] = "Cellular";
71 const char kEthernet
[] = "Ethernet";
72 const char kVPN
[] = "VPN";
73 const char kWiFi
[] = "WiFi";
74 const char kWimax
[] = "Wimax";
75 const char kWireless
[] = "Wireless";
76 } // namespace network_type
79 const char kActivationState
[] = "ActivationState";
80 const char kActivationType
[] = "ActivationType";
81 const char kAllowRoaming
[] = "AllowRoaming";
82 const char kAPN
[] = "APN";
83 const char kAPNList
[] = "APNList";
84 const char kCarrier
[] = "Carrier";
85 const char kESN
[] = "ESN";
86 const char kFamily
[] = "Family";
87 const char kFirmwareRevision
[] = "FirmwareRevision";
88 const char kFoundNetworks
[] = "FoundNetworks";
89 const char kHardwareRevision
[] = "HardwareRevision";
90 const char kHomeProvider
[] = "HomeProvider";
91 const char kICCID
[] = "ICCID";
92 const char kIMEI
[] = "IMEI";
93 const char kIMSI
[] = "IMSI";
94 const char kLastGoodAPN
[] = "LastGoodAPN";
95 const char kManufacturer
[] = "Manufacturer";
96 const char kMDN
[] = "MDN";
97 const char kMEID
[] = "MEID";
98 const char kMIN
[] = "MIN";
99 const char kModelID
[] = "ModelID";
100 const char kNetworkTechnology
[] = "NetworkTechnology";
101 const char kPRLVersion
[] = "PRLVersion";
102 const char kProviderRequiresRoaming
[] = "ProviderRequiresRoaming";
103 const char kRoamingState
[] = "RoamingState";
104 const char kSelectedNetwork
[] = "SelectedNetwork";
105 const char kServingOperator
[] = "ServingOperator";
106 const char kSIMLockStatus
[] = "SIMLockStatus";
107 const char kSIMPresent
[] = "SIMPresent";
108 const char kSupportedCarriers
[] = "SupportedCarriers";
109 const char kSupportNetworkScan
[] = "SupportNetworkScan";
110 } // namespace cellular
112 namespace cellular_provider
{
113 const char kCode
[] = "Code";
114 const char kCountry
[] = "Country";
115 const char kName
[] = "Name";
116 } // namespace cellular_provider
118 namespace cellular_apn
{
119 const char kAccessPointName
[] = "AccessPointName";
120 const char kName
[] = "Name";
121 const char kUsername
[] = "Username";
122 const char kPassword
[] = "Password";
123 const char kLocalizedName
[] = "LocalizedName";
124 const char kLanguage
[] = "LocalizedName";
125 } // namespace cellular_apn
127 namespace cellular_found_network
{
128 const char kStatus
[] = "Status";
129 const char kNetworkId
[] = "NetworkId";
130 const char kShortName
[] = "ShortName";
131 const char kLongName
[] = "LongName";
132 const char kTechnology
[] = "Technology";
133 } // namespace cellular_apn
135 namespace sim_lock_status
{
136 const char kLockEnabled
[] = "LockEnabled";
137 const char kLockType
[] = "LockType";
138 const char kRetriesLeft
[] = "RetriesLeft";
141 namespace connection_state
{
142 const char kConnected
[] = "Connected";
143 const char kConnecting
[] = "Connecting";
144 const char kNotConnected
[] = "NotConnected";
145 } // namespace connection_state
148 const char kAuthentication
[] = "Authentication";
149 const char kAuthenticationNone
[] = "None";
150 const char kEAP
[] = "EAP";
151 const char k8021X
[] = "8021X";
152 } // namespace ethernet
155 const char kGateway
[] = "Gateway";
156 const char kIPAddress
[] = "IPAddress";
157 const char kIPv4
[] = "IPv4";
158 const char kIPv6
[] = "IPv6";
159 const char kNameServers
[] = "NameServers";
160 const char kRoutingPrefix
[] = "RoutingPrefix";
161 const char kType
[] = "Type";
162 } // namespace ipconfig
165 const char kAutoConnect
[] = "AutoConnect";
166 const char kBSSID
[] = "BSSID";
167 const char kEAP
[] = "EAP";
168 const char kFrequency
[] = "Frequency";
169 const char kFrequencyList
[] = "FrequencyList";
170 const char kHiddenSSID
[] = "HiddenSSID";
171 const char kPassphrase
[] = "Passphrase";
172 const char kProxyURL
[] = "ProxyURL";
173 const char kSSID
[] = "SSID";
174 const char kSecurity
[] = "Security";
175 const char kSecurityNone
[] = "None";
176 const char kSignalStrength
[] = "SignalStrength";
177 const char kWEP_8021X
[] = "WEP-8021X";
178 const char kWEP_PSK
[] = "WEP-PSK";
179 const char kWPA_EAP
[] = "WPA-EAP";
180 const char kWPA_PSK
[] = "WPA-PSK";
181 const char kWPA2_PSK
[] = "WPA2-PSK";
184 namespace client_cert
{
185 const char kClientCertPattern
[] = "ClientCertPattern";
186 const char kClientCertRef
[] = "ClientCertRef";
187 const char kClientCertType
[] = "ClientCertType";
188 const char kClientCertTypeNone
[] = "None";
189 const char kCommonName
[] = "CommonName";
190 const char kEmailAddress
[] = "EmailAddress";
191 const char kEnrollmentURI
[] = "EnrollmentURI";
192 const char kIssuerCARef
[] = "IssuerCARef";
193 const char kIssuerCAPEMs
[] = "IssuerCAPEMs";
194 const char kIssuer
[] = "Issuer";
195 const char kLocality
[] = "Locality";
196 const char kOrganization
[] = "Organization";
197 const char kOrganizationalUnit
[] = "OrganizationalUnit";
198 const char kPattern
[] = "Pattern";
199 const char kRef
[] = "Ref";
200 const char kSubject
[] = "Subject";
201 } // namespace client_cert
203 namespace certificate
{
204 const char kAuthority
[] = "Authority";
205 const char kClient
[] = "Client";
206 const char kGUID
[] = "GUID";
207 const char kPKCS12
[] = "PKCS12";
208 const char kServer
[] = "Server";
209 const char kTrustBits
[] = "TrustBits";
210 const char kType
[] = "Type";
211 const char kWeb
[] = "Web";
212 const char kX509
[] = "X509";
213 } // namespace certificate
215 namespace encrypted
{
216 const char kAES256
[] = "AES256";
217 const char kCipher
[] = "Cipher";
218 const char kCiphertext
[] = "Ciphertext";
219 const char kHMACMethod
[] = "HMACMethod";
220 const char kHMAC
[] = "HMAC";
221 const char kIV
[] = "IV";
222 const char kIterations
[] = "Iterations";
223 const char kPBKDF2
[] = "PBKDF2";
224 const char kSHA1
[] = "SHA1";
225 const char kSalt
[] = "Salt";
226 const char kStretch
[] = "Stretch";
227 } // namespace encrypted
230 const char kAnonymousIdentity
[] = "AnonymousIdentity";
231 const char kAutomatic
[] = "Automatic";
232 const char kEAP_AKA
[] = "EAP-AKA";
233 const char kEAP_FAST
[] = "EAP-FAST";
234 const char kEAP_SIM
[] = "EAP-SIM";
235 const char kEAP_TLS
[] = "EAP-TLS";
236 const char kEAP_TTLS
[] = "EAP-TTLS";
237 const char kIdentity
[] = "Identity";
238 const char kInner
[] = "Inner";
239 const char kLEAP
[] = "LEAP";
240 const char kMD5
[] = "MD5";
241 const char kMSCHAPv2
[] = "MSCHAPv2";
242 const char kOuter
[] = "Outer";
243 const char kPAP
[] = "PAP";
244 const char kPEAP
[] = "PEAP";
245 const char kPassword
[] = "Password";
246 const char kSaveCredentials
[] = "SaveCredentials";
247 const char kServerCAPEMs
[] = "ServerCAPEMs";
248 const char kServerCARef
[] = "ServerCARef";
249 const char kServerCARefs
[] = "ServerCARefs";
250 const char kUseSystemCAs
[] = "UseSystemCAs";
254 const char kAutoConnect
[] = "AutoConnect";
255 const char kHost
[] = "Host";
256 const char kIPsec
[] = "IPsec";
257 const char kL2TP
[] = "L2TP";
258 const char kOpenVPN
[] = "OpenVPN";
259 const char kPassword
[] = "Password";
260 const char kSaveCredentials
[] = "SaveCredentials";
261 const char kTypeL2TP_IPsec
[] = "L2TP-IPsec";
262 const char kType
[] = "Type";
263 const char kUsername
[] = "Username";
267 const char kAuthenticationType
[] = "AuthenticationType";
268 const char kCert
[] = "Cert";
269 const char kEAP
[] = "EAP";
270 const char kGroup
[] = "Group";
271 const char kIKEVersion
[] = "IKEVersion";
272 const char kPSK
[] = "PSK";
273 const char kServerCAPEMs
[] = "ServerCAPEMs";
274 const char kServerCARef
[] = "ServerCARef";
275 const char kServerCARefs
[] = "ServerCARefs";
276 const char kXAUTH
[] = "XAUTH";
280 const char kAuthNoCache
[] = "AuthNoCache";
281 const char kAuthRetry
[] = "AuthRetry";
282 const char kAuth
[] = "Auth";
283 const char kCipher
[] = "Cipher";
284 const char kCompLZO
[] = "CompLZO";
285 const char kCompNoAdapt
[] = "CompNoAdapt";
286 const char kIgnoreDefaultRoute
[] = "IgnoreDefaultRoute";
287 const char kInteract
[] = "interact";
288 const char kKeyDirection
[] = "KeyDirection";
289 const char kNoInteract
[] = "nointeract";
290 const char kNone
[] = "none";
291 const char kNsCertType
[] = "NsCertType";
292 const char kPort
[] = "Port";
293 const char kProto
[] = "Proto";
294 const char kPushPeerInfo
[] = "PushPeerInfo";
295 const char kRemoteCertEKU
[] = "RemoteCertEKU";
296 const char kRemoteCertKU
[] = "RemoteCertKU";
297 const char kRemoteCertTLS
[] = "RemoteCertTLS";
298 const char kRenegSec
[] = "RenegSec";
299 const char kServerCAPEMs
[] = "ServerCAPEMs";
300 const char kServerCARef
[] = "ServerCARef";
301 const char kServerCARefs
[] = "ServerCARefs";
302 const char kServerCertPEM
[] = "ServerCertPEM";
303 const char kServerCertRef
[] = "ServerCertRef";
304 const char kServerPollTimeout
[] = "ServerPollTimeout";
305 const char kServer
[] = "server";
306 const char kShaper
[] = "Shaper";
307 const char kStaticChallenge
[] = "StaticChallenge";
308 const char kTLSAuthContents
[] = "TLSAuthContents";
309 const char kTLSRemote
[] = "TLSRemote";
310 const char kVerb
[] = "Verb";
311 const char kVerifyHash
[] = "VerifyHash";
312 const char kVerifyX509
[] = "VerifyX509";
313 } // namespace openvpn
315 namespace verify_x509
{
316 const char kName
[] = "Name";
317 const char kType
[] = "Type";
320 const char kName
[] = "name";
321 const char kNamePrefix
[] = "name-prefix";
322 const char kSubject
[] = "subject";
324 } // namespace verify_x509
327 const char kDirect
[] = "Direct";
328 const char kExcludeDomains
[] = "ExcludeDomains";
329 const char kFtp
[] = "FTPProxy";
330 const char kHost
[] = "Host";
331 const char kHttp
[] = "HTTPProxy";
332 const char kHttps
[] = "SecureHTTPProxy";
333 const char kManual
[] = "Manual";
334 const char kPAC
[] = "PAC";
335 const char kPort
[] = "Port";
336 const char kSocks
[] = "SOCKS";
337 const char kType
[] = "Type";
338 const char kWPAD
[] = "WPAD";
341 namespace substitutes
{
342 const char kLoginIDField
[] = "${LOGIN_ID}";
343 const char kEmailField
[] = "${LOGIN_EMAIL}";
344 } // namespace substitutes
346 namespace global_network_config
{
347 const char kAllowOnlyPolicyNetworksToAutoconnect
[] =
348 "AllowOnlyPolicyNetworksToAutoconnect";
349 } // global_network_config