Re: batching gets and searching



Colm Smyth <Colm Smyth ireland sun com> writes:

> >How about:
> >
> >GSList* gconf_get_multiple (GConfEngine  *engine,
> >                            const gchar **keys,
> >                            GError      **err);
> >
> >where the returned GSList contains GConfEntry with the key set to the
> >fully-qualified key?
> 
> There's nowhere to return the value; perhaps you meant to return values
> in the GSList?
>

The GSList is supposed to contain GConfEntry, each GConfEntry contains
a value (IIRC).

> I think a fully qualified GConfEntry makes more sense in general; as you
> noted above, there is value in keeping the key and value associated.
>

Let's plan to do this then.

> >I would guess a key question is, what is this expression and what does
> >it match? (Do we convert int/bool/float keys into a string?)
> 
> For the purposes of searching, yes. Given that the purpose of the API
> is to enable a searchable GConf GUI, it would be too complex to
> allow input of values of each specific type.
>

Let's call the function gconf_text_search_new() to allow a future
gconf_search_new() that does some more complete type of search.

> >The convention in G* libs is "GConfSearchFlags flags", for better or
> >worse, where GConfSearchFlags is the enum containing the flags.
> 
> The individual flags should be an enum, but the flags may be ORed together so
> the API argument should be an int.
>

I agree in principle, but the convention in G* world is different,
there's no point breaking it.

Havoc




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