>> 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.
>> 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.
>>
>> 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 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.
>>
>> o The property name schema for representing address books
>> could be changed to be more general and meaningful.
>> - The schema is currently:
>> 'ldap_2.servers.<unique name>.*'
>> Since there will be address books of different type
>> the 'ldap_2' could be changed to 'address':
>> 'address.servers.<unique name>.*
>
>If we want to do this we need to change the preferences we already have
>for adressbooks. And also we need to change the ldap_2... preferences
>that we migrated from 4.x. I think we should get input from Candice on
>this.
>
Yep.
>> o The directory factory interface can have an
>> additional method to create instances from a
>> branch entry in the preferences using the
>> nsIPrefBranch interface.
>> - The nsIPrefBranch.idl has recently been
>> updated is looking alot cleaner than the
>> nsIPref.idl
>
>I agree, nsIPrefBranch is lot cleaner.
>I am not sure nsIPrefBranch is turned on by default in the build right
>now, but I believe in the near future it is going to be.
>
That is correct.
Paul.
| ? + ? = To question
----------------\
Paul Sandoz
x19219
+353-1-8199219