blob: 6453eeecdab448a2c11a35a6b913b0c50acde98e [file] [log] [blame]
Andrew de los Reyes785bc352010-05-26 12:34:53 -07001// Copyright (c) 2010 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// 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
9#ifndef CHROMEOS_PLATFORM_UPDATE_ENGINE_SIMPLE_KEY_VALUE_STORE_H__
10#define CHROMEOS_PLATFORM_UPDATE_ENGINE_SIMPLE_KEY_VALUE_STORE_H__
11
12#include <map>
13#include <string>
14
15namespace chromeos_update_engine {
16namespace simple_key_value_store {
17
18// Parses a string.
19std::map<std::string, std::string> ParseString(const std::string& str);
20
21std::string AssembleString(const std::map<std::string, std::string>& data);
22
23} // namespace simple_key_value_store
24} // namespace chromeos_update_engine
25
26#endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_SIMPLE_KEY_VALUE_STORE_H__