1 #include <filesystem>
2 #include <functional>
3 #include <map>
4 #include <memory>
5 #include <string>
6 #include <variant>
7 #include <vector>
8 
9 namespace sdbusplus
10 {
11 namespace bus
12 {
13 class bus;
14 } // namespace bus
15 using bus_t = bus::bus;
16 } // namespace sdbusplus
17 
18 namespace sdeventplus
19 {
20 class Event;
21 } // namespace sdeventplus
22 
23 namespace functions
24 {
25 namespace process_hostfirmware
26 {
27 using ErrorCallbackType =
28     std::function<void(const std::filesystem::path&, std::error_code&)>;
29 using LinkCallbackType =
30     std::function<void(const std::filesystem::path&,
31                        const std::filesystem::path&, const ErrorCallbackType&)>;
32 using MaybeCallCallbackType =
33     std::function<void(const std::vector<std::string>&)>;
34 bool getExtensionsForIbmCompatibleSystem(
35     const std::map<std::string, std::vector<std::string>>&,
36     const std::vector<std::string>&, std::vector<std::string>&);
37 void writeLink(const std::filesystem::path&, const std::filesystem::path&,
38                const ErrorCallbackType&);
39 void findLinks(const std::filesystem::path&, const std::vector<std::string>&,
40                const ErrorCallbackType&, const LinkCallbackType&);
41 bool maybeCall(
42     const std::map<
43         std::string,
44         std::map<std::string, std::variant<std::vector<std::string>>>>&,
45     const MaybeCallCallbackType&);
46 std::shared_ptr<void> processHostFirmware(
47     sdbusplus::bus_t&, std::map<std::string, std::vector<std::string>>,
48     std::filesystem::path, ErrorCallbackType, sdeventplus::Event&);
49 std::vector<std::shared_ptr<void>>
50     updateBiosAttrTable(sdbusplus::bus_t&,
51                         std::map<std::string, std::vector<std::string>>,
52                         std::filesystem::path, sdeventplus::Event&);
53 } // namespace process_hostfirmware
54 } // namespace functions
55