| OLD | NEW |
| 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> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 CHROMEOS_EXPORT extern const StringTranslationEntry kRoamingStateTable[]; | 36 CHROMEOS_EXPORT extern const StringTranslationEntry kRoamingStateTable[]; |
| 37 | 37 |
| 38 // A separate translation table for cellular properties that are stored in a | 38 // A separate translation table for cellular properties that are stored in a |
| 39 // Shill Device instead of a Service. The |shill_property_name| entries | 39 // Shill Device instead of a Service. The |shill_property_name| entries |
| 40 // reference Device properties, not Service properties. | 40 // reference Device properties, not Service properties. |
| 41 extern const FieldTranslationEntry kCellularDeviceTable[]; | 41 extern const FieldTranslationEntry kCellularDeviceTable[]; |
| 42 | 42 |
| 43 const FieldTranslationEntry* GetFieldTranslationTable( | 43 const FieldTranslationEntry* GetFieldTranslationTable( |
| 44 const OncValueSignature& onc_signature); | 44 const OncValueSignature& onc_signature); |
| 45 | 45 |
| 46 // Returns the path at which the translation of an ONC object will be stored in | |
| 47 // a Shill dictionary if its signature is |onc_signature|. | |
| 48 // The default is that values are stored directly in the top level of the Shill | |
| 49 // dictionary. | |
| 50 std::vector<std::string> GetPathToNestedShillDictionary( | 46 std::vector<std::string> GetPathToNestedShillDictionary( |
| 51 const OncValueSignature& onc_signature); | 47 const OncValueSignature& onc_signature); |
| 52 | 48 |
| 53 bool GetShillPropertyName(const std::string& onc_field_name, | 49 bool GetShillPropertyName(const std::string& onc_field_name, |
| 54 const FieldTranslationEntry table[], | 50 const FieldTranslationEntry table[], |
| 55 std::string* shill_property_name); | 51 std::string* shill_property_name); |
| 56 | 52 |
| 57 // Translate individual strings to Shill using the above tables. | 53 // Translate individual strings to Shill using the above tables. |
| 58 CHROMEOS_EXPORT bool TranslateStringToShill( | 54 CHROMEOS_EXPORT bool TranslateStringToShill( |
| 59 const StringTranslationEntry table[], | 55 const StringTranslationEntry table[], |
| 60 const std::string& onc_value, | 56 const std::string& onc_value, |
| 61 std::string* shill_value); | 57 std::string* shill_value); |
| 62 | 58 |
| 63 // Translate individual strings to ONC using the above tables. | 59 // Translate individual strings to ONC using the above tables. |
| 64 CHROMEOS_EXPORT bool TranslateStringToONC(const StringTranslationEntry table[], | 60 CHROMEOS_EXPORT bool TranslateStringToONC(const StringTranslationEntry table[], |
| 65 const std::string& shill_value, | 61 const std::string& shill_value, |
| 66 std::string* onc_value); | 62 std::string* onc_value); |
| 67 | 63 |
| 68 } // namespace onc | 64 } // namespace onc |
| 69 } // namespace chromeos | 65 } // namespace chromeos |
| 70 | 66 |
| 71 #endif // CHROMEOS_NETWORK_ONC_ONC_TRANSLATION_TABLES_H_ | 67 #endif // CHROMEOS_NETWORK_ONC_ONC_TRANSLATION_TABLES_H_ |
| OLD | NEW |