Paul Sandoz wrote:
> >> Been thinking about how to improve the preferences
> >> related behaviour/usage of the address book with a
> >> view to rewriting the nsDirPrefs.cpp code.
> >
> >Actually I am not using nsDirPrefs.cpp to store the directory
> >preferences.
> >I am writing JS code to save preferences.
> >
>
> Ok. Thats good!
>
> So there is still the problem that if an LDAP
> directory has been added to the address book
> from the preferences how does the address book
> 'abdirectory' data resource get notified that a
> new address book has been created?, so that it
> can create a corresponding resource and notify
> the RDF data source.
>
> Do you have any ideas on how to do this?
>
> I am concerned that there will be two applications
> in Mozilla that can manipulate address related
> preferences but cannot easily inform each other
> on the level of 'create new address book' and
> 'delete new address book'.
>
> Perhaps an address book preferences session service
> could be the answer. Where clients can observe
> and inform of changes.
> Could also perform enumeration over the address
> preferences returning nsIPerfBranch interfaces
> for global or account specific entries.
I haven't thought about this at all. I need to think about various options
that are available. Will look into it post 0.9.
> >> o Should not have to deal with old style preferences
> >> e.g. ldap_1, and perform migrating. This should
> >> be in separate code and run once when required.
> >
> >I believe these preferences have already been migrated.
> >
>
> It appears that the nsDirPrefs.cpp code can migrate
> from ldap_1 to ldap_2 and removes obsolete entries.
> It checks the ldap_2.version preference entry to
> see if it should check for any ldap_1 entries.
> I think this should be performed by the Pref
> Migration service if it needs to be performed
> at all now.
yup.
> >>
> >> o Address book types can be defined by the 'uri'
> >> property.
> >
> >Other than having a dirType preference how can we put it in the uri?
> >Atleast for directory servers we cannot put it in the url.
> >
>
> The type can be defined by the uri scheme e.g:
>
> ldap://....
> moz-abmdbdirectory://abook.mab
> moz-abmapidirectory://
>
> so if the uri is used the dirType preference becomes
> redundant.
>
o.k For ldap we are going with the uri scheme.
>
>
> >> o For account specific directories there needs to be a
> >> related property that is a reference to the account
> >> in question.
> >
> >We are saving this preference per identity.
> >e.g. mail.idenity.id1.directoryServer
> >
>
> Ah! So this would represent the default directory
> server which would be used for auto complete
> instead of a global one.
yup, if you chose to override the global one.
Srilatha