A draft for a standard for desktop configuration
Jamie McCracken
jamiemcc at blueyonder.co.uk
Sat Sep 24 15:50:58 EEST 2005
Philip Van Hoof wrote:
>
> I'm open for suggestions.
>
> - The type element should be reusable (cascading/externalRef?) between
> schemes
I would be very careful here - any type cock up would seriously
compromise the config system. Consider two schemae that redefine a type
"my_type_format" to two different formats, which one do you use?
Generally it would be safer to define some static aliases (like the list
of types Waldo gave you) and not allow user definable types to be
aliased at all. (of course if you can find a way to make user definable
aliases unique and safe then that would be cool)
[snip]
> typedef struct {
>
> int my_num;
> char *my_str;
> double my_double;
> int *my_bools;
>
> } my_special_one;
>
> This one would become a non-homogeneous list that embeds a integer, a
> string a double and a list with doubles. Like this:
>
> <type wire="ai" alias="my_special_one" real="list"
> format="non-homogeneous">
This looks wrong - they dbus type cannot be "ai" here - it should be
"(isdab)"
> <list>
> <type wire="i" alias="my_num" real="simple" format="integer"/>
> <type wire="s" alias="my_str" real="simple" format="string"/>
> <type wire="d" alias="my_double" real="simple" format="double"/>
> <type wire="ab" alias="" real="list" format="boolean"/>
we should not allow arrays to be embedded into structs! If you do you
wont know how to de/serialize it from/to a comma seperated string stored
in a DB or inifile (this is true if the array of booleans was in the
middle of the struct).
If we have an alias in the type declaration why do we need the other
fields (wire, real, format)?
Doesn't that defeat the purpose of it as the alias should define all
that info elsewhere in the schema.
--
Mr Jamie McCracken
http://www.advogato.org/person/jamiemcc/
More information about the xdg
mailing list