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