MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / PluginLoadInfo

Method PluginLoadInfo

src/yvalve/PluginManager.cpp:781–824  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

779 bool required;
780
781 explicit PluginLoadInfo(const char* pluginName)
782 {
783 // check for directories in pluginName
784 PathName path, file;
785 PathUtils::splitLastComponent(path, file, pluginName);
786 if (path.hasData())
787 (Arg::Gds(isc_random) << "Plugin name should not contain directory separator and path component").raise();
788
789 // define default values for plugin ...
790 curModule = fb_utils::getPrefix(IConfigManager::DIR_PLUGINS, pluginName);
791 regName = pluginName;
792 required = false;
793
794 // and try to load them from conf file
795 conf = findInPluginsConf("Plugin", pluginName);
796
797 if (conf.hasData())
798 {
799 const ConfigFile::Parameter* v = conf->findParameter("RegisterName");
800 if (v)
801 {
802 regName = v->value.ToPathName();
803 }
804
805 v = conf->findParameter("Module");
806 if (v)
807 {
808 curModule = v->value.ToPathName();
809 }
810
811 v = conf->findParameter("Required");
812 if (v)
813 {
814 required = v->asBoolean();
815 }
816 }
817
818 plugConfigFile = curModule;
819 changeExtension(plugConfigFile, "conf");
820
821 PathUtils::fixupSeparators(curModule);
822 PathUtils::fixupSeparators(regName);
823 PathUtils::fixupSeparators(plugConfigFile);
824 }
825 };
826
827

Callers

nothing calls this directly

Calls 9

GdsClass · 0.85
getPrefixFunction · 0.85
findInPluginsConfFunction · 0.85
changeExtensionFunction · 0.85
findParameterMethod · 0.80
ToPathNameMethod · 0.80
hasDataMethod · 0.45
raiseMethod · 0.45
asBooleanMethod · 0.45

Tested by

no test coverage detected