| Patrick Venture | 4dc584d | 2018-09-27 15:00:46 -0700 | [diff] [blame] | 1 | #pragma once | 
|  | 2 |  | 
| Patrick Venture | c18e2b6 | 2018-11-21 14:19:28 -0800 | [diff] [blame] | 3 | #include "internal/sys.hpp" | 
|  | 4 |  | 
|  | 5 | #include <blobs-ipmid/manager.hpp> | 
|  | 6 | #include <memory> | 
| Patrick Venture | 4dc584d | 2018-09-27 15:00:46 -0700 | [diff] [blame] | 7 | #include <string> | 
|  | 8 |  | 
|  | 9 | namespace blobs | 
|  | 10 | { | 
| Patrick Venture | c18e2b6 | 2018-11-21 14:19:28 -0800 | [diff] [blame] | 11 | using HandlerFactory = std::unique_ptr<GenericBlobInterface> (*)(); | 
|  | 12 |  | 
|  | 13 | /** | 
|  | 14 | * The bitbake recipe symlinks the library lib*.so.? into the folder | 
|  | 15 | * only, and not the other names, .so, .so.?.?, .so.?.?.? | 
|  | 16 | * | 
|  | 17 | * Therefore only care if it's lib*.so.? | 
|  | 18 | * | 
|  | 19 | * @param[in] the path to check. | 
|  | 20 | * @return true if matches, false otherwise | 
|  | 21 | */ | 
|  | 22 | bool matchBlobHandler(const std::string& filename); | 
| Patrick Venture | 4dc584d | 2018-09-27 15:00:46 -0700 | [diff] [blame] | 23 |  | 
|  | 24 | /** | 
|  | 25 | * @brief Given a path, find libraries (*.so only) and load them. | 
|  | 26 | * | 
| Patrick Venture | c18e2b6 | 2018-11-21 14:19:28 -0800 | [diff] [blame] | 27 | * @param[in] manager - pointer to a manager | 
| Patrick Venture | 4dc584d | 2018-09-27 15:00:46 -0700 | [diff] [blame] | 28 | * @param[in] paths - list of fully qualified paths to libraries to load. | 
| Patrick Venture | c18e2b6 | 2018-11-21 14:19:28 -0800 | [diff] [blame] | 29 | * @param[in] sys - pointer to implementation of the dlsys interface. | 
| Patrick Venture | 4dc584d | 2018-09-27 15:00:46 -0700 | [diff] [blame] | 30 | */ | 
| Patrick Venture | c18e2b6 | 2018-11-21 14:19:28 -0800 | [diff] [blame] | 31 | void loadLibraries(ManagerInterface* manager, const std::string& path, | 
|  | 32 | const internal::DlSysInterface* sys = &internal::dlsys_impl); | 
| Patrick Venture | 4dc584d | 2018-09-27 15:00:46 -0700 | [diff] [blame] | 33 |  | 
|  | 34 | } // namespace blobs |