#pragma once #include #include #include "error.hpp" #include #include #include #include "module_interface.hpp" class ModuleLoader { public: explicit ModuleLoader(std::string module_path = "/usr/lib/dpm/modules/"); DPMError list_available_modules(std::vector& modules) const; DPMError get_module_path(std::string& path) const; // Load and execute methods DPMError load_module(const std::string& module_name, void*& module_handle) const; DPMError execute_module(const std::string& module_name, const std::string& command) const; // Get module version DPMError get_module_version(void* module_handle, std::string& version) const; // Get module description DPMError get_module_description(void* module_handle, std::string& description) const; // Check if all required symbols from module_interface.hpp are exported by the module DPMError validate_module_interface(void* module_handle, std::vector& missing_symbols) const; private: std::string module_path_; };