blob: b53fc2b484e3a50362ca219a66f002b9a76b3ea7 [file] [log] [blame]
Gunnar Mills701e0212017-04-03 11:21:27 -05001#pragma once
2
Gunnar Mills701e0212017-04-03 11:21:27 -05003#include "xyz/openbmc_project/Common/TFTP/server.hpp"
4
Gunnar Millsb0ce9962018-09-07 13:39:10 -05005#include <sdbusplus/bus.hpp>
Andrew Geissler9155b712020-05-16 13:04:44 -05006#include <string>
Gunnar Millsb0ce9962018-09-07 13:39:10 -05007
Gunnar Mills701e0212017-04-03 11:21:27 -05008namespace phosphor
9{
10namespace software
11{
12namespace manager
13{
14
15using 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 */
23class Download : public DownloadInherit
24{
Adriana Kobylak2285fe02018-02-27 15:36:59 -060025 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 Mills701e0212017-04-03 11:21:27 -050033
Adriana Kobylak2285fe02018-02-27 15:36:59 -060034 /**
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 Mills701e0212017-04-03 11:21:27 -050042};
43
44} // namespace manager
45} // namespace software
46} // namespace phosphor