blob: b784baf5ceacb6cd94f6e6d95ed1271d3a10ba8a [file] [log] [blame]
Ratan Gupta95a29312019-02-18 20:34:10 +05301#pragma once
2
3#include <filesystem>
4#include "ldap_configuration.hpp"
5
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