Gunnar Mills | 701e021 | 2017-04-03 11:21:27 -0500 | [diff] [blame] | 1 | #pragma once |
| 2 | |
| 3 | #include <sdbusplus/bus.hpp> |
| 4 | #include "xyz/openbmc_project/Common/TFTP/server.hpp" |
| 5 | |
| 6 | namespace phosphor |
| 7 | { |
| 8 | namespace software |
| 9 | { |
| 10 | namespace manager |
| 11 | { |
| 12 | |
| 13 | using DownloadInherit = sdbusplus::server::object::object< |
| 14 | sdbusplus::xyz::openbmc_project::Common::server::TFTP>; |
| 15 | |
| 16 | /** @class Download |
| 17 | * @brief OpenBMC download software management implementation. |
| 18 | * @details A concrete implementation for xyz.openbmc_project.Common.TFTP |
| 19 | * DBus API. |
| 20 | */ |
| 21 | class Download : public DownloadInherit |
| 22 | { |
| 23 | public: |
| 24 | /** @brief Constructs Download Software Manager |
| 25 | * |
| 26 | * @param[in] bus - The Dbus bus object |
| 27 | * @param[in] objPath - The Dbus object path |
| 28 | */ |
| 29 | Download(sdbusplus::bus::bus& bus, |
| 30 | const std::string& objPath) : DownloadInherit( |
| 31 | bus, (objPath).c_str()) {}; |
| 32 | |
| 33 | /** |
| 34 | * @brief Download the specified image via TFTP |
| 35 | * |
| 36 | * @param[in] fileName - The name of the file to transfer. |
| 37 | * @param[in] serverAddress - The TFTP Server IP Address. |
| 38 | **/ |
| 39 | void downloadViaTFTP(const std::string fileName, |
| 40 | const std::string serverAddress) override; |
| 41 | }; |
| 42 | |
| 43 | } // namespace manager |
| 44 | } // namespace software |
| 45 | } // namespace phosphor |
| 46 | |