blob: 739d3e9a2600de0db34faabff74c3e36e1d5a174 [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.
Patrick Venturebf58cd62018-12-11 09:05:46 -080016 * @param[in] imagePath - the path to the image file.
17 * @param[in] signaturePath - the path to the signature file.
Patrick Venture9f937c42019-06-21 07:55:54 -070018 * @param[in] layoutType - the image update layout type (static/ubi/other)
Brandon Kim6749ba12019-09-19 13:31:37 -070019 * @param[in] ignoreUpdate - determines whether to ignore the update status
Patrick Venture2bc23fe2018-12-13 10:16:36 -080020 * @throws ToolException on failures.
Patrick Venturebf58cd62018-12-11 09:05:46 -080021 */
Patrick Venture1f09d412019-06-19 16:01:06 -070022void updaterMain(UpdateHandlerInterface* updater, const std::string& imagePath,
Patrick Venture9f937c42019-06-21 07:55:54 -070023 const std::string& signaturePath,
Brandon Kim6749ba12019-09-19 13:31:37 -070024 const std::string& layoutType, bool ignoreUpdate);
Patrick Venture9b534f02018-12-13 16:10:02 -080025
26} // namespace host_tool