blob: edafaab386bd32c291e8f65d55dae4ea88a5b10e [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>
6
Gunnar Mills701e0212017-04-03 11:21:27 -05007namespace phosphor
8{
9namespace software
10{
11namespace manager
12{
13
14using DownloadInherit = sdbusplus::server::object::object<
15 sdbusplus::xyz::openbmc_project::Common::server::TFTP>;
16
17/** @class Download
18 * @brief OpenBMC download software management implementation.
19 * @details A concrete implementation for xyz.openbmc_project.Common.TFTP
20 * DBus API.
21 */
22class Download : public DownloadInherit
23{
Adriana Kobylak2285fe02018-02-27 15:36:59 -060024 public:
25 /** @brief Constructs Download Software Manager
26 *
27 * @param[in] bus - The Dbus bus object
28 * @param[in] objPath - The Dbus object path
29 */
30 Download(sdbusplus::bus::bus& bus, const std::string& objPath) :
31 DownloadInherit(bus, (objPath).c_str()){};
Gunnar Mills701e0212017-04-03 11:21:27 -050032
Adriana Kobylak2285fe02018-02-27 15:36:59 -060033 /**
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(std::string fileName,
40 std::string serverAddress) override;
Gunnar Mills701e0212017-04-03 11:21:27 -050041};
42
43} // namespace manager
44} // namespace software
45} // namespace phosphor