blob: 30e0b73dbe4415d41812156f2c377c341212b39c [file] [log] [blame]
Gunnar Mills701e0212017-04-03 11:21:27 -05001#pragma once
2
3#include <sdbusplus/bus.hpp>
4#include "xyz/openbmc_project/Common/TFTP/server.hpp"
5
6namespace phosphor
7{
8namespace software
9{
10namespace manager
11{
12
13using DownloadInherit = sdbusplus::server::object::object<
14 sdbusplus::xyz::openbmc_project::Common::server::TFTP>;
15
16/** @class Download
17 * @brief OpenBMC download software management implementation.
18 * @details A concrete implementation for xyz.openbmc_project.Common.TFTP
19 * DBus API.
20 */
21class Download : public DownloadInherit
22{
Adriana Kobylak2285fe02018-02-27 15:36:59 -060023 public:
24 /** @brief Constructs Download Software Manager
25 *
26 * @param[in] bus - The Dbus bus object
27 * @param[in] objPath - The Dbus object path
28 */
29 Download(sdbusplus::bus::bus& bus, const std::string& objPath) :
30 DownloadInherit(bus, (objPath).c_str()){};
Gunnar Mills701e0212017-04-03 11:21:27 -050031
Adriana Kobylak2285fe02018-02-27 15:36:59 -060032 /**
33 * @brief Download the specified image via TFTP
34 *
35 * @param[in] fileName - The name of the file to transfer.
36 * @param[in] serverAddress - The TFTP Server IP Address.
37 **/
38 void downloadViaTFTP(std::string fileName,
39 std::string serverAddress) override;
Gunnar Mills701e0212017-04-03 11:21:27 -050040};
41
42} // namespace manager
43} // namespace software
44} // namespace phosphor