Re: Read plugin config from a file



El mié, 01-12-2010 a las 10:38 +0100, Joaquim Rocha escribió:
> On Wed, 2010-12-01 at 10:31 +0100, Iago Toral Quiroga wrote:
> > Hi,
> > 
> > I'd like to work on fixing bug #636064, it is a feature request to add
> > the possibility to load plugin configuration from a file.
> > 
> > Given that different apps may need different configurations for the
> > plugins (example: each app has to use its own API keys), the way this
> > would work is that each app ships the config files for the plugins.
> > 
> > One option for the file format is a key-file, which is standard, easy to
> > use and fast to parse (GLib as you know supports this already). That
> > would work good for almost all the use cases I can think of. 
> 
> For a matter of consistency, wouldn't it be better to XML files, like
> the ones used for the plugins' information?

It is an option, but I would rather avoid using XML files for
configuration unless it is really needed. XML parsing is slower and less
convenient while key-files have a great support in GLib already making
them really easy use.
http://library.gnome.org/devel/glib/stable/glib-Key-value-file-parser.html

Actually, I would be more for proposing changing the plugin information
files to be key-files too and remove the libxml dependency from Grilo,
after all, we do not need XML for that and key-files are pretty standard
in the freedesktop environment.

Iago



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