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