26 #ifndef PLUGIN_BLACKLIST_H
27 #define PLUGIN_BLACKLIST_H
35 #define gnu_major major
36 #define gnu_minor minor
41 typedef enum class plug_status {
53 plug_data(std::string n,
int _major,
int _minor)
54 : name(n), major(_major), minor(_minor) {}
74 int _major,
int _minor) = 0;
93 int major,
int minor) = 0;
102 std::unique_ptr<AbstractBlacklist> blacklist_factory();
105 #define major gnu_major
106 #define minor gnu_minor
Plugins could be blacklisted in runtime if they are unloadable or in hardcoded, compile-time list.
virtual bool is_loadable(const std::string path)=0
Return true iff plugin (a path) is loadable.
virtual bool mark_unloadable(const std::string &name, int major, int minor)=0
Given plugin name and version mark it as unloadable.
virtual bool mark_unloadable(const std::string &path)=0
Given a path, mark filename as unloadable.
virtual plug_status get_status(const std::string &name, int _major, int _minor)=0
Return status for given official plugin name and version.
virtual std::string get_message(plug_status sts, const plug_data &data)=0
Return plugin-specific message, possibly "".
virtual plug_data get_library_data(const std::string &library_file)=0
Best effort attempt to get data for a library file.
virtual plug_status get_status(const plug_data pd)=0
Return status for given official plugin name and version.