blob: 760a1b2c0c462e7d2b3ffee8dd445d8ded1c1cfd [file] [log] [blame]
Patrick Ventureab650002019-03-16 09:08:47 -07001#pragma once
2
3#include <nlohmann/json.hpp>
4#include <string>
5
6namespace google
7{
8namespace ipmi
9{
10
11/**
12 * Parse a file and return the json object.
13 *
14 * @param[in] file - the path to the file to parse.
15 * @return the json object if valid.
16 * @throw elog<InternalFailure> on failures.
17 */
18nlohmann::json parseConfig(const std::string& file);
19
Patrick Venture8d5c9ce2019-03-16 11:20:12 -070020/**
21 * Read a dts property file and return the contents.
22 *
23 * @param[in] file - the path to the file to parse.
24 * @return the property value or an empty string on failure.
25 */
26std::string readPropertyFile(const std::string& fileName);
27
Patrick Ventureab650002019-03-16 09:08:47 -070028} // namespace ipmi
29} // namespace google