blob: a947747e37c7b3506427e2bf01aae04b9c2d6192 [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>
Adriana Kobylak58aa7502020-06-08 11:12:11 -05006
Andrew Geissler9155b712020-05-16 13:04:44 -05007#include <string>
Gunnar Millsb0ce9962018-09-07 13:39:10 -05008
Gunnar Mills701e0212017-04-03 11:21:27 -05009namespace phosphor
10{
11namespace software
12{
13namespace manager
14{
15
Patrick Williamsbf2bb2b2022-07-22 19:26:52 -050016using DownloadInherit = sdbusplus::server::object_t<
Gunnar Mills701e0212017-04-03 11:21:27 -050017 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 */
24class Download : public DownloadInherit
25{
Adriana Kobylak2285fe02018-02-27 15:36:59 -060026 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 */
Patrick Williamsbf2bb2b2022-07-22 19:26:52 -050032 Download(sdbusplus::bus_t& bus, const std::string& objPath) :
Adriana Kobylak2285fe02018-02-27 15:36:59 -060033 DownloadInherit(bus, (objPath).c_str()){};
Gunnar Mills701e0212017-04-03 11:21:27 -050034
Adriana Kobylak2285fe02018-02-27 15:36:59 -060035 /**
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 Mills701e0212017-04-03 11:21:27 -050043};
44
45} // namespace manager
46} // namespace software
47} // namespace phosphor