On 11/12/2015 06:20 PM, Adriano dos Santos Fernandes wrote: > Hi! > > Currently plugin entry points receives just an IMaster. > > It cannot do much things with only this. > > Not all plugins will register a factory and do all the work lazily.
If plugin does not register a factory error loading it will be reported by plugin manager and module will be unloaded. > It should receive a "plugin config" parameter You mix "plugin" and "module with plugin(s)". Configuration is passed to particular instance of plugin, created by factory, and may vary from instance to instance. Passing configuration to module makes no sense. > and an Status to report > errors to the engine, to log them or return to the user. What about Status - I see no problems, that's correct. > > Maybe they should be returned to the user, and a method to log things is > also necessary, but that probably should live in IMaster/IUtil Yes. We need an analogue of gds__log in IUtil. > and is > not directly related to plugins. > > Instead of add "plugin config" parameter to the prototype, I think a new > interface PluginInitialization should be created, currently with: > IMaster* getMaster(); > IConfig* getConfig(); /* not sure if current IConfig means the plugin > config */ Config is rather generic interface, to configure plugin (do not mix with it module about loading which we are talking here) slightly more s;ecific interface is used, PluginConfig, but it can not be passed to the module - it contains information specific to _plugin_, not _module_. Generic Config certainly maybe passed, but I have no idea what pairs key=value it should contain. > So the prototype will become: > > void FB_PLUGIN_ENTRY_POINT(IStatus*, IPluginInitialization*); OK, let's pass here more generic interface. Though currently I do not see something except getMaster() in it - let's be generic. ------------------------------------------------------------------------------ Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
