blob: 2ee03fbeeae922ae04d328c4858d8ef70eb01191 [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{
23 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,
30 const std::string& objPath) : DownloadInherit(
31 bus, (objPath).c_str()) {};
32
33 /**
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 **/
Gunnar Mills49739432017-04-21 11:03:34 -050039 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
46