Paul Sandoz <[EMAIL PROTECTED]> writes:
> 
> >>    The LDAP preferences could be used by other clients which
> >>    are not interested in address books directories like the
> >>    LDAP auto-completion code. So I thought it was better to
> >>    keep the generic scheme and let the factories return more
> >>    specific schemes in line with the more specific functionality.
> >
> >But what I don't get is if I'm looking for preferences unrelated to
> >the addressbook, why would I be going through something called
> >'@mozilla.org/addressbook/directory-factory...' to get them?  Sorry if 
> >I'm being overly slow here.
> >
> 
>       I'm confused now!
>       I don't think i am explaining things all that well.
> 
>       The '@mozilla.org/addressbook/directory-factory...' string
>       is used to instantiate nsIAbDirectory componentes given
>       a uri and a set of other preferences defined as name value
>       pairs. We have designed a boot strap directory component
>       which is reposnsible for creating directory implementations
>       (top level address books) from the preferences. This
>       is where the factories will be used (we have yet to
>       implement this bit, but should not take long)
>       (we also need a way of getting notified when new
>        LDAP address books have been created in the preferences).
>       The idea is to hide how/where the preferences are stored
>       from the address book directory implementations.
>       
>       So its the other way around, other clients can interpret
>       preferences how they wish without being imposed on by
>       address book semantics, i.e 'abldapdirectory'

OK, thanks.  I think I get it now: you're using it as a layer of
indirection to keep out unnecessary dependencies on the specific
preferences used.  A fine goal; we're also trying to keep the LDAP XPCOM
SDK (formerly known as the wrapper) from depending on preferences at
all.

Dan
-- 

Reply via email to