1 #ifndef PLUGIN_MANAGER_H 2 #define PLUGIN_MANAGER_H 13 #include <plugin_api.h> 14 #include <plugin_handle.h> 21 typedef enum PluginType
23 PLUGIN_TYPE_ID_STORAGE,
43 PLUGIN_HANDLE
loadPlugin(
const std::string& name,
44 const std::string& type);
45 void unloadPlugin(PLUGIN_HANDLE handle);
47 const std::string& symbol);
53 std::list<std::string>& plugins);
55 PLUGIN_TYPE getPluginImplType(
const PLUGIN_HANDLE hndl) {
return pluginImplTypes[hndl]; }
56 std::vector<std::string>
getPluginsByFlags(
const std::string& type,
unsigned int flags);
62 std::string findPlugin(std::string name, std::string _type, std::string _plugin_path, PLUGIN_TYPE type);
65 std::list<PLUGIN_HANDLE> plugins;
66 std::map<std::string, PLUGIN_HANDLE> pluginNames;
67 std::map<std::string, std::string> pluginTypes;
68 std::map<PLUGIN_HANDLE, PLUGIN_TYPE> pluginImplTypes;
69 std::map<PLUGIN_HANDLE, PLUGIN_INFORMATION *>
71 std::map<PLUGIN_HANDLE, PluginHandle*>
74 tPluginType m_pluginType;
Fledge Logger class used to log to syslog.
Definition: logger.h:26
static PluginManager * getInstance()
PluginManager Singleton implementation.
Definition: plugin_manager.cpp:43
The manager for plugins.
Definition: plugin_manager.h:40
std::vector< std::string > getPluginsByFlags(const std::string &type, unsigned int flags)
Return a list of plugins matching the criteria of plugin type and plugin flags.
Definition: plugin_manager.cpp:666
PLUGIN_HANDLE loadPlugin(const std::string &name, const std::string &type)
Load a given plugin.
Definition: plugin_manager.cpp:265
void getInstalledPlugins(const std::string &type, std::list< std::string > &plugins)
Get the installed plugins in the given plugin type subdirectory of "plugins" under FLEDGE_ROOT Plugin...
Definition: plugin_manager.cpp:562
void setPluginType(tPluginType type)
Set Plugin Type.
Definition: plugin_manager.cpp:257
PLUGIN_INFORMATION * getInfo(const PLUGIN_HANDLE)
Return the information for a named plugin.
Definition: plugin_manager.cpp:531
PLUGIN_HANDLE findPluginByType(const std::string &type)
Find a loaded plugin by type.
Definition: plugin_manager.cpp:519
PLUGIN_HANDLE findPluginByName(const std::string &name)
Find a loaded plugin by name.
Definition: plugin_manager.cpp:507
void * resolveSymbol(PLUGIN_HANDLE handle, const std::string &symbol)
Resolve a symbol within the plugin.
Definition: plugin_manager.cpp:543