| 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 |
nothing calls this directly
no test coverage detected