2 #ifndef _PYTHON_PLUGIN_HANDLE_H 3 #define _PYTHON_PLUGIN_HANDLE_H 17 #include <plugin_handle.h> 20 typedef void* (*pluginResolveSymbolFn)(
const char *,
const std::string&);
21 typedef void (*pluginCleanupFn)(
const std::string&);
44 pluginCleanupFn cleanupFn =
45 (pluginCleanupFn) dlsym(m_hndl,
"PluginInterfaceCleanup");
46 if (cleanupFn == NULL)
49 Logger::getLogger()->error(
"Plugin library %s does not support %s function : %s",
50 m_interfaceObjName.c_str(),
51 "PluginInterfaceCleanup",
74 pluginResolveSymbolFn resolvSymFn =
75 (pluginResolveSymbolFn) dlsym(m_hndl,
"PluginInterfaceResolveSymbol");
76 if (resolvSymFn == NULL)
79 Logger::getLogger()->error(
"Plugin library %s does not support " 81 m_interfaceObjName.c_str(),
82 "PluginInterfaceResolveSymbol",
86 void *rv = resolvSymFn(sym, m_name);
91 if (m_type.compare(PLUGIN_TYPE_FILTER) == 0)
93 Logger::getLogger()->debug(
"PythonPluginHandle::ResolveSymbol " 94 "returning NULL for sym=%s, plugin %s, type %s",
101 Logger::getLogger()->error(
"PythonPluginHandle::ResolveSymbol " 102 "returning NULL for sym=%s, plugin %s, type %s",
122 void *getHandle() {
return this; }
127 std::string m_interfaceObjName;
The PythonPluginHandle class is the base class used to represent an interface to a plugin that is ava...
Definition: python_plugin_handle.h:27
~PythonPluginHandle()
Base destructor.
Definition: python_plugin_handle.h:38
void * GetInfo()
Returns function pointer that can be invoked to call 'plugin_info' function in python plugin...
Definition: python_plugin_handle.h:116
void * ResolveSymbol(const char *sym)
Gets function pointer from loaded python interface library that can be invoked to call 'sym' function...
Definition: python_plugin_handle.h:68
The PluginHandle class is used to represent an opaque handle to a plugin instance.
Definition: plugin_handle.h:24