| #ifndef THIRD_PARTY_GBMCWEB_REDFISH_CORE_INCLUDE_UTILS_SUBPROCESS_UTILS_H_ |
| #define THIRD_PARTY_GBMCWEB_REDFISH_CORE_INCLUDE_UTILS_SUBPROCESS_UTILS_H_ |
| |
| #include <memory> |
| #include <string> |
| #include <utility> |
| #include <vector> |
| |
| #include "async_resp.hpp" |
| |
| namespace redfish { |
| |
| class SubprocessUtilsBase { |
| public: |
| virtual ~SubprocessUtilsBase() = default; |
| |
| virtual void childProcessRun( |
| const std::shared_ptr<bmcweb::AsyncResp>& asyncResp, |
| const std::vector<std::string>& resetCmd) = 0; |
| |
| static SubprocessUtilsBase* getInstance(); |
| |
| static void setInstance(std::unique_ptr<SubprocessUtilsBase> instance) { |
| instance_ = std::move(instance); |
| } |
| |
| private: |
| static std::unique_ptr<SubprocessUtilsBase> instance_; |
| }; |
| |
| } // namespace redfish |
| |
| #endif // THIRD_PARTY_GBMCWEB_REDFISH_CORE_INCLUDE_UTILS_SUBPROCESS_UTILS_H_ |