Re: Inspecting options supported by plugins

On 19/04/2011 10:12, Iago Toral wrote:
> If we decide that we need this, I'd do as Guillaume suggested in
> bugzilla and use GrlCaps to provide the API to access the configuration
> options available.
> As for the way plugin developers would provide descriptions of the
> supported options I have a feeling that we should not use the XML file.
> The reason is that the options that a plugin supports are set in the
> plugin's code not in some other file. It does not matter what the XML
> file says if the plugin's code is not consistent with that. We would be
> separating the implementation of the options from their definition and I
> think that is not good, actually, we could very well have an XML file
> saying that a certain plugin supports options A,B,C and then the plugin
> code not supporting them at all because the XML file and the actual code
> do not match. I think this is a lot more likely to happen in the case we
> go with XML files.


> Then there is also the fact that we should be getting rid of declarative
> interfaces like supported_keys as we agreed when we decided to have
> GrlCaps, so I think the definition of the supported options should be
> done in the plugin code  when defining its caps. Maybe some API like
> grl_caps_add_config_option() would do the trick.
> Finally, if we add this API we should have the registry checking the
> options provided by clients for specific plugins and seeing that they
> are actually supported.
Could that be a way of getting rid of these thousand warnings we get
when trying to load all plugins while not having a specific
configuration required by some of them?


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]