Ratan Gupta | 95a2931 | 2019-02-18 20:34:10 +0530 | [diff] [blame] | 1 | #pragma once |
| 2 | |
| 3 | #include <filesystem> |
| 4 | #include "ldap_configuration.hpp" |
| 5 | |
| 6 | namespace phosphor |
| 7 | { |
| 8 | namespace ldap |
| 9 | { |
| 10 | |
| 11 | namespace 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 | */ |
| 19 | fs::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 | */ |
| 26 | bool deserialize(const fs::path& path, Config& config); |
| 27 | |
| 28 | } // namespace ldap |
| 29 | } // namespace phosphor |