blob: 9f7d1cf3b817bfeae57383a8744b187b7b3b9fd9 [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
16using 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 */
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 */
32 Download(sdbusplus::bus::bus& bus, const std::string& objPath) :
33 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