Chris Masone | f8d037f | 2014-02-19 01:53:00 +0000 | [diff] [blame] | 1 | // Copyright (c) 2010 The Chromium OS Authors. All rights reserved. |
Andrew de los Reyes | 785bc35 | 2010-05-26 12:34:53 -0700 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | // These functions can parse a blob of data that's formatted as a simple |
| 6 | // key value store. Each key/value pair is stored on its own line and |
| 7 | // separated by the first '=' on the line. |
| 8 | |
Alex Deymo | 759c275 | 2014-03-17 21:09:36 -0700 | [diff] [blame^] | 9 | #ifndef CHROMEOS_PLATFORM_UPDATE_ENGINE_SIMPLE_KEY_VALUE_STORE_H_ |
| 10 | #define CHROMEOS_PLATFORM_UPDATE_ENGINE_SIMPLE_KEY_VALUE_STORE_H_ |
Andrew de los Reyes | 785bc35 | 2010-05-26 12:34:53 -0700 | [diff] [blame] | 11 | |
| 12 | #include <map> |
| 13 | #include <string> |
| 14 | |
| 15 | namespace chromeos_update_engine { |
| 16 | namespace simple_key_value_store { |
Chris Masone | f8d037f | 2014-02-19 01:53:00 +0000 | [diff] [blame] | 17 | |
| 18 | // Parses a string. |
Andrew de los Reyes | 785bc35 | 2010-05-26 12:34:53 -0700 | [diff] [blame] | 19 | std::map<std::string, std::string> ParseString(const std::string& str); |
| 20 | |
| 21 | std::string AssembleString(const std::map<std::string, std::string>& data); |
| 22 | |
| 23 | } // namespace simple_key_value_store |
| 24 | } // namespace chromeos_update_engine |
| 25 | |
Alex Deymo | 759c275 | 2014-03-17 21:09:36 -0700 | [diff] [blame^] | 26 | #endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_SIMPLE_KEY_VALUE_STORE_H_ |