Initial Download manager
This is the basic download manager that implements
xyz/openbmc_project/Common/TFTP.interface.yaml
Change-Id: I429b0f2fbce3864dee5051af727b88b3a3fe1227
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
diff --git a/download_manager.hpp b/download_manager.hpp
new file mode 100644
index 0000000..b78dc4b
--- /dev/null
+++ b/download_manager.hpp
@@ -0,0 +1,46 @@
+#pragma once
+
+#include <sdbusplus/bus.hpp>
+#include "xyz/openbmc_project/Common/TFTP/server.hpp"
+
+namespace phosphor
+{
+namespace software
+{
+namespace manager
+{
+
+using DownloadInherit = sdbusplus::server::object::object<
+ sdbusplus::xyz::openbmc_project::Common::server::TFTP>;
+
+/** @class Download
+ * @brief OpenBMC download software management implementation.
+ * @details A concrete implementation for xyz.openbmc_project.Common.TFTP
+ * DBus API.
+ */
+class Download : public DownloadInherit
+{
+ public:
+ /** @brief Constructs Download Software Manager
+ *
+ * @param[in] bus - The Dbus bus object
+ * @param[in] objPath - The Dbus object path
+ */
+ Download(sdbusplus::bus::bus& bus,
+ const std::string& objPath) : DownloadInherit(
+ bus, (objPath).c_str()) {};
+
+ /**
+ * @brief Download the specified image via TFTP
+ *
+ * @param[in] fileName - The name of the file to transfer.
+ * @param[in] serverAddress - The TFTP Server IP Address.
+ **/
+ void downloadViaTFTP(const std::string fileName,
+ const std::string serverAddress) override;
+};
+
+} // namespace manager
+} // namespace software
+} // namespace phosphor
+