Patrick Venture | bf58cd6 | 2018-12-11 09:05:46 -0800 | [diff] [blame] | 1 | #pragma once |
| 2 | |
Patrick Venture | a658636 | 2018-12-11 18:47:13 -0800 | [diff] [blame] | 3 | #include "interface.hpp" |
Patrick Venture | 0088759 | 2018-12-11 10:57:06 -0800 | [diff] [blame] | 4 | |
Patrick Venture | 664c5bc | 2019-03-07 08:09:45 -0800 | [diff] [blame] | 5 | #include <ipmiblob/blob_interface.hpp> |
Patrick Venture | bf58cd6 | 2018-12-11 09:05:46 -0800 | [diff] [blame] | 6 | #include <string> |
| 7 | |
Patrick Venture | 9b534f0 | 2018-12-13 16:10:02 -0800 | [diff] [blame] | 8 | namespace host_tool |
| 9 | { |
| 10 | |
Patrick Venture | bf58cd6 | 2018-12-11 09:05:46 -0800 | [diff] [blame] | 11 | /** |
Patrick Venture | d61b0ff | 2019-05-15 15:58:06 -0700 | [diff] [blame^] | 12 | * Poll an open verification session. |
| 13 | * |
| 14 | * @param[in] session - the open verification session |
| 15 | * @param[in] blob - pointer to blob interface implementation object. |
| 16 | * @return true if the verification was successul. |
| 17 | */ |
| 18 | bool pollVerificationStatus(std::uint16_t session, |
| 19 | ipmiblob::BlobInterface* blob); |
| 20 | |
| 21 | /** |
Patrick Venture | bf58cd6 | 2018-12-11 09:05:46 -0800 | [diff] [blame] | 22 | * Attempt to update the BMC's firmware using the interface provided. |
| 23 | * |
Patrick Venture | 0088759 | 2018-12-11 10:57:06 -0800 | [diff] [blame] | 24 | * @param[in] blob - pointer to blob interface implementation object. |
Patrick Venture | a658636 | 2018-12-11 18:47:13 -0800 | [diff] [blame] | 25 | * @param[in] handler - pointer to the data interface implementation object. |
Patrick Venture | bf58cd6 | 2018-12-11 09:05:46 -0800 | [diff] [blame] | 26 | * @param[in] imagePath - the path to the image file. |
| 27 | * @param[in] signaturePath - the path to the signature file. |
Patrick Venture | 2bc23fe | 2018-12-13 10:16:36 -0800 | [diff] [blame] | 28 | * @throws ToolException on failures. |
Patrick Venture | bf58cd6 | 2018-12-11 09:05:46 -0800 | [diff] [blame] | 29 | */ |
Patrick Venture | 664c5bc | 2019-03-07 08:09:45 -0800 | [diff] [blame] | 30 | void updaterMain(ipmiblob::BlobInterface* blob, DataInterface* handler, |
Patrick Venture | 2bc23fe | 2018-12-13 10:16:36 -0800 | [diff] [blame] | 31 | const std::string& imagePath, |
| 32 | const std::string& signaturePath); |
Patrick Venture | 9b534f0 | 2018-12-13 16:10:02 -0800 | [diff] [blame] | 33 | |
| 34 | } // namespace host_tool |