Persist the snmp manager configuration

This commit persist the manager configuration D-Bus objects
and restores it once service starts.

This commit also deletes the associated persistent file whenever
snmp client D-Bus object gets deleted.

Change-Id: I1526b52870ee5dfea30e6527bad3fd12d1191a13
Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
diff --git a/snmp_serialize.hpp b/snmp_serialize.hpp
new file mode 100644
index 0000000..044d784
--- /dev/null
+++ b/snmp_serialize.hpp
@@ -0,0 +1,35 @@
+#pragma once
+
+#include <experimental/filesystem>
+#include "snmp_client.hpp"
+
+namespace phosphor
+{
+namespace network
+{
+namespace snmp
+{
+
+constexpr auto SEPRATOR = "_";
+
+namespace fs = std::experimental::filesystem;
+
+/** @brief Serialize and persist SNMP manager/client D-Bus object
+ *  @param[in] manager - const reference to snmp client/manager object.
+ *  @param[in] path -  path of persistent location where D-Bus object would be
+ * saved.
+ *  @return fs::path - pathname of persisted snmp manager/client file.
+ */
+fs::path serialize(const Client& manager, const fs::path& path);
+
+/** @brief Deserialze SNMP manager/client info into a D-Bus object
+ *  @param[in] path - pathname of persisted manager/client file.
+ *  @param[in] manager - reference to snmp client/manager object
+ *                       which is the target of deserialization.
+ *  @return bool - true if the deserialization was successful, false otherwise.
+ */
+bool deserialize(const fs::path& path, Client& manager);
+
+} // namespace snmp
+} // namespace network
+} // namespace phosphor