I have an app that uses gconf for configuration and I have notice that some apps install a schema file that lists keys and gives descriptions on them.
Is this mandatory or schema files are optional? It is certainly working without them.
My concerns about the schema is that I don't see how my key schema could be explained.
I store account information on /apps/blah..blah/accounts
with one folder per account, but I
don't see how could I specify that. /apps/blah..blah/accounts/<account_example>/name is a string owned by blahblah
I doubt that could work as there might be several or none accounts under that folder.
Some GConf keys, like panel applets and toplevels, have 0..n arity as well. The schema association is done in code, and GConf will store it next to the data under ~/.gconf.
For example, panel_profile_create_toplevel calls panel_gconf_associate_schemas_in_dir which calls gconf_engine_associate_schema. The package ships
/usr/share/gconf/schemas/panel-toplevel.schemas
which describes/schemas/apps/panel/toplevels/*
, and that code copies it to/schemas/apps/panel/toplevels/$PANEL_NAME/*
.You could also use gconf_client_set_schema to set a key and give it a schema at once. And you might get away with no schema at all for these keys.
GSettings, part of Gnome 3, makes schemas mandatory for applications, but doesn't retain them in the backend. A schema without a path will be relocatable, permitting the app to instanciate it for multiple settings subtrees.
The official page describing the different parts of the GConf application: http://projects.gnome.org/gconf/
This should give you the answers you are looking for.