blob: 2fa25c07af43a7ef1db3a2051b06a83ee804411e [file] [log] [blame]
#include <filesystem>
#include <functional>
#include <map>
#include <memory>
#include <string>
#include <variant>
#include <vector>
namespace sdbusplus
{
namespace bus
{
class bus;
} // namespace bus
using bus_t = bus::bus;
} // namespace sdbusplus
namespace sdeventplus
{
class Event;
} // namespace sdeventplus
namespace functions
{
namespace process_hostfirmware
{
using ErrorCallbackType =
std::function<void(const std::filesystem::path&, std::error_code&)>;
using LinkCallbackType =
std::function<void(const std::filesystem::path&,
const std::filesystem::path&, const ErrorCallbackType&)>;
using MaybeCallCallbackType =
std::function<void(const std::vector<std::string>&)>;
bool getExtensionsForIbmCompatibleSystem(
const std::map<std::string, std::vector<std::string>>&,
const std::vector<std::string>&, std::vector<std::string>&);
void writeLink(const std::filesystem::path&, const std::filesystem::path&,
const ErrorCallbackType&);
void findLinks(const std::filesystem::path&, const std::vector<std::string>&,
const ErrorCallbackType&, const LinkCallbackType&);
bool maybeCall(
const std::map<
std::string,
std::map<std::string, std::variant<std::vector<std::string>>>>&,
const MaybeCallCallbackType&);
std::shared_ptr<void> processHostFirmware(
sdbusplus::bus_t&, std::map<std::string, std::vector<std::string>>,
std::filesystem::path, ErrorCallbackType, sdeventplus::Event&);
std::vector<std::shared_ptr<void>>
updateBiosAttrTable(sdbusplus::bus_t&,
std::map<std::string, std::vector<std::string>>,
std::filesystem::path, sdeventplus::Event&);
} // namespace process_hostfirmware
} // namespace functions