Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(370)

Side by Side Diff: chromeos/network/onc/onc_translation_tables.h

Issue 11962048: This adds Cellular to the Shill to ONC translation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixing broken unit test Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chromeos/network/onc/onc_signature.cc ('k') | chromeos/network/onc/onc_translation_tables.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_TRANSLATION_TABLES_H_ 5 #ifndef CHROMEOS_NETWORK_ONC_ONC_TRANSLATION_TABLES_H_
6 #define CHROMEOS_NETWORK_ONC_ONC_TRANSLATION_TABLES_H_ 6 #define CHROMEOS_NETWORK_ONC_ONC_TRANSLATION_TABLES_H_
7 7
8 #include <string>
9
8 namespace chromeos { 10 namespace chromeos {
9 namespace onc { 11 namespace onc {
10 12
11 struct StringTranslationEntry { 13 struct StringTranslationEntry {
12 const char* onc_value; 14 const char* onc_value;
13 const char* shill_value; 15 const char* shill_value;
14 }; 16 };
15 17
16 // These tables contain the mapping from ONC strings to Shill strings. 18 // These tables contain the mapping from ONC strings to Shill strings.
17 // These are NULL-terminated arrays. 19 // These are NULL-terminated arrays.
18 extern const StringTranslationEntry kNetworkTypeTable[]; 20 extern const StringTranslationEntry kNetworkTypeTable[];
19 extern const StringTranslationEntry kVPNTypeTable[]; 21 extern const StringTranslationEntry kVPNTypeTable[];
20 extern const StringTranslationEntry kWiFiSecurityTable[]; 22 extern const StringTranslationEntry kWiFiSecurityTable[];
21 extern const StringTranslationEntry kEAPOuterTable[]; 23 extern const StringTranslationEntry kEAPOuterTable[];
22 extern const StringTranslationEntry kEAP_PEAP_InnerTable[]; 24 extern const StringTranslationEntry kEAP_PEAP_InnerTable[];
23 extern const StringTranslationEntry kEAP_TTLS_InnerTable[]; 25 extern const StringTranslationEntry kEAP_TTLS_InnerTable[];
24 26
27 // Translate individual strings to Shill using the above tables.
28 bool TranslateStringToShill(const StringTranslationEntry table[],
29 const std::string& onc_value,
30 std::string* shill_value);
31
32 // Translate individual strings to ONC using the above tables.
33 bool TranslateStringToONC(const StringTranslationEntry table[],
34 const std::string& shill_value,
35 std::string* onc_value);
36
25 } // namespace onc 37 } // namespace onc
26 } // namespace chromeos 38 } // namespace chromeos
27 39
28 #endif // CHROMEOS_NETWORK_ONC_ONC_TRANSLATION_TABLES_H_ 40 #endif // CHROMEOS_NETWORK_ONC_ONC_TRANSLATION_TABLES_H_
OLDNEW
« no previous file with comments | « chromeos/network/onc/onc_signature.cc ('k') | chromeos/network/onc/onc_translation_tables.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698