1 #pragma once
2 
3 #include "xyz/openbmc_project/Common/TFTP/server.hpp"
4 
5 #include <sdbusplus/bus.hpp>
6 
7 #include <string>
8 
9 namespace phosphor
10 {
11 namespace software
12 {
13 namespace manager
14 {
15 
16 using DownloadInherit = sdbusplus::server::object_t<
17     sdbusplus::server::xyz::openbmc_project::common::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  */
24 class Download : public DownloadInherit
25 {
26   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_t& bus, const std::string& objPath) :
33         DownloadInherit(bus, (objPath).c_str()) {};
34 
35     /**
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;
43 };
44 
45 } // namespace manager
46 } // namespace software
47 } // namespace phosphor
48