blob: bcadd31d35092c105019204e4ce5578c635be91f [file] [log] [blame]
Patrick Venturebf58cd62018-12-11 09:05:46 -08001#pragma once
2
Patrick Venture01123b22019-06-20 13:49:06 -07003#include "handler.hpp"
Patrick Venture00887592018-12-11 10:57:06 -08004
Patrick Venture664c5bc2019-03-07 08:09:45 -08005#include <ipmiblob/blob_interface.hpp>
Patrick Venture9b37b092020-05-28 20:58:57 -07006
Patrick Venturebf58cd62018-12-11 09:05:46 -08007#include <string>
8
Patrick Venture9b534f02018-12-13 16:10:02 -08009namespace host_tool
10{
11
Patrick Ventured61b0ff2019-05-15 15:58:06 -070012/**
Patrick Venturebf58cd62018-12-11 09:05:46 -080013 * Attempt to update the BMC's firmware using the interface provided.
14 *
Patrick Venture55646de2019-05-16 10:06:26 -070015 * @param[in] updater - update handler object.
Willy Tu203ad802021-09-09 20:06:36 -070016 * @param[in] blob - ipmi blob object.
Patrick Venturebf58cd62018-12-11 09:05:46 -080017 * @param[in] imagePath - the path to the image file.
18 * @param[in] signaturePath - the path to the signature file.
Patrick Venture9f937c42019-06-21 07:55:54 -070019 * @param[in] layoutType - the image update layout type (static/ubi/other)
Brandon Kim6749ba12019-09-19 13:31:37 -070020 * @param[in] ignoreUpdate - determines whether to ignore the update status
Patrick Venture2bc23fe2018-12-13 10:16:36 -080021 * @throws ToolException on failures.
Patrick Venturebf58cd62018-12-11 09:05:46 -080022 */
Willy Tu203ad802021-09-09 20:06:36 -070023void updaterMain(UpdateHandlerInterface* updater, ipmiblob::BlobInterface* blob,
24 const std::string& imagePath, const std::string& signaturePath,
Brandon Kim6749ba12019-09-19 13:31:37 -070025 const std::string& layoutType, bool ignoreUpdate);
Patrick Venture9b534f02018-12-13 16:10:02 -080026
27} // namespace host_tool