blob: b20ccd426adb92b9b45d5a59678776bf39c93d1b [file] [log] [blame]
Ratan Gupta95a29312019-02-18 20:34:10 +05301#pragma once
2
3#include <filesystem>
Ratan Gupta37fb3fe2019-04-13 12:54:18 +05304#include "ldap_config.hpp"
Ratan Gupta95a29312019-02-18 20:34:10 +05305
6namespace phosphor
7{
8namespace ldap
9{
10
11namespace fs = std::filesystem;
12
13/** @brief Serialize and persist LDAP service status property.
14 * @param[in] config - const reference to LDAP config object.
15 * @param[in] path - path of persistent location where D-Bus property would be
16 * saved.
17 * @return fs::path - pathname of persisted LDAP Config file.
18 */
19fs::path serialize(const Config& config, const fs::path& path);
20
21/** @brief Deserialize LDAP service status into a D-Bus object
22 * @param[in] path - pathname of persisted LDAP Config file.
23 * @param[in] config - reference of the object which needs to be deserialized.
24 * @return bool - true if the deserialization was successful, false otherwise.
25 */
26bool deserialize(const fs::path& path, Config& config);
27
28} // namespace ldap
29} // namespace phosphor