Re: LDAP backend CODE



Hi Ben,

I don't whole-heartedly recommend it, but I'd like to share my technique
for locale-support with you; I used hidden directory names to contain
locale-specific keys.

The first backend (XML) has a (undocumented) requirement that '%' can't
be used in key names.  I used this to name hidden locale directories,
e.g. for a key /gnome/desktop/logo, the en_US locale would have a key
name of /gnome/desktop/%locale%en_US/logo.

I used a sub-directory because it makes locale-based searches faster and
the default locale values should be taken in preference to non-locale
values (ie.  keys with no specified locale).  When returning keynames
via an API (say _all_entries), I transform the keynames to exclude the
%locale% information; when returning directories from _all_dirs, I
exclude the %locale% directories.

Colm.

>Delivered-To: gconf-list gnome org
>From: monkeyiq dingoblue net au
>X-Accept-Language: en
>MIME-Version: 1.0
>To: gconf-list <gconf-list gnome org>
>Subject: LDAP backend CODE
>X-BeenThere: gconf-list gnome org
>X-Loop: gconf-list gnome org
>X-Mailman-Version: 2.0beta5
>List-Id: Discussion of the GConf library <gconf-list.gnome.org>
>
>Hi,
>    the file ldap/hack.c should not be there, it is just a copy of
>bdb_() stuff so
>automake/conf work ok.
>
>    serialize.c has my new demux for marshaling in it.
>
>    the code probably has bugs in it still, its just so that everyone
>has an
>idea of what I am doing. (atleast I am doing release early... now if
>I can just remember the second part :)
>
>    The biggest limitations are
>->    locales are not handled yet.
>->    pairIO with marshaling is broken and listIO is fully broken
>
>For list IO I have made strv functions... which currently don't work:
>I will try to figure this out, the strv functions are based on existing
>gconf code,
>it's prolly a quick fix with the GList stuff, but I am still having
>probs with the glib
>collections...
>
>unittest.c
>
>  value = gconf_value_set_list_strv_nocopy(vals);
>  printf("tryListIO: created list: %s \n",
>gconf_value_to_string(value));
>  vals2 = __gconf_list_to_strv( value );
>
>BTW I noticed that glib just abort()s the code if there is no
>RAM available.
>Is this really what we want for a systems library.
>
>
>Oh well, I may take a break for a few days, then implement SSL/TLS for
>this.
>(I should get locals and list/pairs going first I guess).
>
>Just add the dir to configure.in and it should be ok, note that you 
need
>
>openldap 2.0.7 for this, I can't compile it with the 1.x that comes 
with
>
>rh7. It works ok with gcc2.96.
>
>Place it in gconf/backends/ldap to build. ie extract the archive from
>gconf/backends/.
>





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