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