blob: 062f704c709b1804c9f7cd19bd1b550ad0269c57 [file] [log] [blame]
Patrick Venturebf58cd62018-12-11 09:05:46 -08001#pragma once
2
Patrick Venturea6586362018-12-11 18:47:13 -08003#include "interface.hpp"
Patrick Venture00887592018-12-11 10:57:06 -08004
Patrick Venture664c5bc2019-03-07 08:09:45 -08005#include <ipmiblob/blob_interface.hpp>
Patrick Venturebf58cd62018-12-11 09:05:46 -08006#include <string>
7
Patrick Venture9b534f02018-12-13 16:10:02 -08008namespace host_tool
9{
10
Patrick Venturebf58cd62018-12-11 09:05:46 -080011/**
Patrick Ventured61b0ff2019-05-15 15:58:06 -070012 * 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 */
18bool pollVerificationStatus(std::uint16_t session,
19 ipmiblob::BlobInterface* blob);
20
21/**
Patrick Venturebf58cd62018-12-11 09:05:46 -080022 * Attempt to update the BMC's firmware using the interface provided.
23 *
Patrick Venture00887592018-12-11 10:57:06 -080024 * @param[in] blob - pointer to blob interface implementation object.
Patrick Venturea6586362018-12-11 18:47:13 -080025 * @param[in] handler - pointer to the data interface implementation object.
Patrick Venturebf58cd62018-12-11 09:05:46 -080026 * @param[in] imagePath - the path to the image file.
27 * @param[in] signaturePath - the path to the signature file.
Patrick Venture2bc23fe2018-12-13 10:16:36 -080028 * @throws ToolException on failures.
Patrick Venturebf58cd62018-12-11 09:05:46 -080029 */
Patrick Venture664c5bc2019-03-07 08:09:45 -080030void updaterMain(ipmiblob::BlobInterface* blob, DataInterface* handler,
Patrick Venture2bc23fe2018-12-13 10:16:36 -080031 const std::string& imagePath,
32 const std::string& signaturePath);
Patrick Venture9b534f02018-12-13 16:10:02 -080033
34} // namespace host_tool