Re: MidgardConfig comments (Was: [midgard-dev] Automake and directories)
Piotras <pp-VVDi8QVAvoBWk0Htik3J/[email protected]> Fri, 24 Feb 2006 10:51:10 +0100
| Newsgroups | gmane.comp.web.midgard.devel |
|---|---|
| Message-ID | <[email protected]> |
"Jukka Zitting" <[email protected]> wrote: > Hi, > > We should start turning this conversation into documentation in the > code and on the wiki. There's been much talk but not many hard > decisions. We should nail down at least the following (with my > suggestions in parenthesis): > > 0) Roadmap for the new configuration mechanism > (beta in 1.8, stable in 1.9) http://www.midgard-project.org/development/roadmap/1-8/ http://www.midgard-project.org/development/roadmap/1-9/ > 1) Format of the configuration files > (the GKeyFile format, perhaps using the real GKeyFile parser later on) 1. I already fixed boolean values. GLib supports also 0 and 1 as values. One should read sources to know this, so we support true or false now. 2. I am not sure about comments real syntax. 3. I am not sure if it's worth to write special code to parse values ( stripping spaces and duplicated equal signs ) 4. Libgda config file location? > 2) Location of the configuration files > (SYSCONFDIR/midgard/conf.d/*.conf and $HOME/.midgard/conf.d/*.conf) Can we define it in configure script and statically in header file? I mean only $sysconfdir. I do not follow XDG Base Directory logic here. > 3) The API to read and construct configuration objects > (See my MidgardConfig proposal a few messages ago) That's fine. However I would likt to keep existing midgard_config_read_file instead of midgard_config_read. And I am not sure about such thing: MidgardConfig *midgard_config_new(void); MidgardConfig *midgard_config_read(const char *filename, GError **error); If both returns MidgardConfig , why do you need the first one , if you do not pass it as config_read parameter? Shouldn't it be : MidgardConfig *midgard_config_new(void); gboolean midgard_config_read(MidgardConfig *config, const char *filename, GError **error); ? Of course midgard_config_new(void) could be used directly with midgard_connection as initialized MidgardConfig which is set internally by MidgardConnection implementation. > 4) The API to use the configuration to create a connection > (See my MidgardConnection proposal a few messages ago) That's fine too. I will read *full* midgard_connection API proposal and will commit as standalone ( not used ) header file. I would like to start using doxygen on nathan next week , so we can have good reference url then. > > Yes, I can not focus on log files only now. > > OK. We can postpone the log discussion to another thread. Absolutely. This feature is *very* important and I need it *now* usable in HEAD. Piotras