config daemon/library for 4.6

Jens Luedicke jens.luedicke at
Tue Sep 4 14:00:11 CEST 2007

On 9/4/07, Brian J. Tarricone <bjt23 at> wrote:
> Hey guys,
> Just spent a few hours hacking together a config daemon and library
> sorta somewhat based on Jannis' spec[1].
> I changed the name to 'Xfconf' to avoid confusion with the old MCS
> system and libraries.  The dbus interface is basically the same with a
> couple cosmetic changes and some functional changes to the GUI-related
> stuff.  You can take a look at my interface definition at [2].
> It's not complete.  It compiles, but there's no configuration store
> backend (well, there is one, but the get/set parts aren't implemented
> yet).  The client library should be functionally complete (though I'm
> not sure I'm happy with the API yet), and the daemon runs but doesn't
> really do all that much.
> You can take a look at what I have so far in my sandbox svn repo[3].
> The client API has a bunch of functions for getting/setting properties
> that look sorta like this:
> gboolean xfconf_channel_get_int(XfconfChannel *channel,
>                                 const gchar *property,
>                                 gint *value);
> A few open questions:
> 1.  I don't really like this all that much, but I want an API where you
> can tell from the return if the property was or wasn't in the config
> store at all (in this case, by the gboolean return type).  Any thoughts
> on a better way?
> 2.  I also wonder if we need a way to remove properties entirely?
> 3.  Would the model used for XfceRc work better?  XfceRc doesn't have a
> true/false return, but instead has an extra 'fallback' parameter which
> gets returned instead if the value isn't in the config file.  This
> works well in situations where you want to have a default value if one
> isn't set yet, without having a bunch of if/else trees.

void xfconf_channel_get_int(XfconfChannel *channel,
                               const gchar *property,
                               gint *value, gint default);


gint xfconf_channel_get_int(XfconfChannel *channel,
                               const gchar *property, gint default);

if there is no property with that name, default is returned
like this?


Jens Luedicke

More information about the Xfce4-dev mailing list