blob: bd4007d2114c915a3df14016e4ff6f89816c8f21 [file] [log] [blame]
Brad Bishop099543e2020-11-09 15:37:58 -05001#include <filesystem>
2#include <functional>
3#include <map>
4#include <memory>
5#include <string>
6#include <variant>
7#include <vector>
8
9namespace sdbusplus
10{
11namespace bus
12{
13class bus;
14} // namespace bus
15} // namespace sdbusplus
16
17namespace sdeventplus
18{
19class Event;
20} // namespace sdeventplus
21
22namespace functions
23{
24namespace process_hostfirmware
25{
26using ErrorCallbackType =
27 std::function<void(const std::filesystem::path&, std::error_code&)>;
28using LinkCallbackType =
29 std::function<void(const std::filesystem::path&,
30 const std::filesystem::path&, const ErrorCallbackType&)>;
31using MaybeCallCallbackType =
32 std::function<void(const std::vector<std::string>&)>;
33bool getExtensionsForIbmCompatibleSystem(
34 const std::map<std::string, std::vector<std::string>>&,
35 const std::vector<std::string>&, std::vector<std::string>&);
36void writeLink(const std::filesystem::path&, const std::filesystem::path&,
37 const ErrorCallbackType&);
38void findLinks(const std::filesystem::path&, const std::vector<std::string>&,
39 const ErrorCallbackType&, const LinkCallbackType&);
40bool maybeCall(
41 const std::map<
42 std::string,
43 std::map<std::string, std::variant<std::vector<std::string>>>>&,
44 const MaybeCallCallbackType&);
45std::shared_ptr<void> processHostFirmware(
46 sdbusplus::bus::bus&, std::map<std::string, std::vector<std::string>>,
47 std::filesystem::path, ErrorCallbackType, sdeventplus::Event&);
Adriana Kobylak53a27392021-06-14 17:42:40 +000048std::shared_ptr<void>
49 updateBiosAttrTable(sdbusplus::bus::bus&,
50 std::map<std::string, std::vector<std::string>>,
Adriana Kobylakae0998f2021-06-16 19:52:24 +000051 std::filesystem::path, sdeventplus::Event&);
Brad Bishop099543e2020-11-09 15:37:58 -050052} // namespace process_hostfirmware
53} // namespace functions