@@ -179,6 +179,7 @@ int PluginManager::loadPlugin(const String& pluginLoc) {
179179 LoadedLibInfo lib;
180180 lib.apiVersion = libInfo.apiVersion ;
181181 lib.name = libInfo.name ;
182+ lib.libVersion = libInfo.libVersion ;
182183 lib.numPlugins = libInfo.numPlugins ;
183184 lib.handle = handle;
184185
@@ -197,7 +198,7 @@ int PluginManager::loadPlugin(const String& pluginLoc) {
197198 info.creator = pInfo.processor .creator ;
198199 info.name = pInfo.processor .name ;
199200 info.type = pInfo.processor .type ;
200- info.libIndex = libArray.size ();
201+ info.libIndex = libArray.size ()- 1 ;
201202 processorPlugins.add (info);
202203 break ;
203204 }
@@ -314,14 +315,37 @@ Plugin::FileSourceInfo PluginManager::getFileSourceInfo(String name, String libN
314315 return i;
315316}
316317
317- String PluginManager::getPluginName (int index) const
318+ String PluginManager::getLibraryName (int index) const
319+ {
320+ if (index < 0 || index >= libArray.size ())
321+ return String::empty;
322+ else
323+ return libArray[index].name ;
324+ }
325+
326+ int PluginManager::getLibraryVersion (int index) const
318327{
319- return libArray[index].name ;
328+ if (index < 0 || index >= libArray.size ())
329+ return -1 ;
330+ else
331+ return libArray[index].libVersion ;
320332}
321333
322- int PluginManager::getPluginVersion ( int index) const
334+ int PluginManager::getLibraryIndexFromPlugin (Plugin::PluginType type, int index)
323335{
324- return libArray[index].libVersion ;
336+ switch (type)
337+ {
338+ case Plugin::ProcessorPlugin:
339+ return processorPlugins[index].libIndex ;
340+ case Plugin::RecordEnginePlugin:
341+ return recordEnginePlugins[index].libIndex ;
342+ case Plugin::DatathreadPlugin:
343+ return dataThreadPlugins[index].libIndex ;
344+ case Plugin::FileSourcePlugin:
345+ return fileSourcePlugins[index].libIndex ;
346+ default :
347+ return -1 ;
348+ }
325349}
326350
327351Plugin::ProcessorInfo PluginManager::getEmptyProcessorInfo ()
0 commit comments