>> I am unsure of the relationship between account
>> specific LDAP directories and the address book
>> since currently the address is related to global
>> address books obtained from the pref.js
>
>At this moment, there is no particular relationship. But presumably
>your work will change that. :-)
>
... yes sort of, but as per previous mail there
might be overlap in relation to how preferences
are stored in prefs.js. To implement an account
specific aware abdirectory data resource we will
need to know the storage spec.
I think i might have a go re-writing the
nsDirPrefs code to be general...
>> Ideally i think that all address book/directory
>> operations should be performed on the 'abbsdirectory'
>> RDF data resource, i.e. the boot strap resource (not
>> a good name i know).
>
>We're trying to name new mozilla-internal URI schemes starting with
>moz- now, as documented in bug 69513. So as per your subsequent post,
>perhaps moz-abdirectory: ?
>
Yes, that sounds good.
I have spotted a problem with using the '-'
character. The nsIRDFServer.getResource method
implemented by nsRDFService.cpp:
http://lxr.mozilla.org/seamonkey/source/rdf/base/src/nsRDFService.cpp#642
does not allow for this character:
669 // Compute the scheme of the URI. Scan forward until we either:
670 //
671 // 1. Reach the end of the string
672 // 2. Encounter a non-alpha character
673 // 3. Encouter a colon.
674 //
675 // If we encounter a colon _before_ encountering a non-alpha
676 // character, then assume it's the scheme.
677 //
678 // XXX Although it's really not correct, we'll allow underscore
679 // characters ('_'), too.
Hence it is not possible to use a scheme containing
'-' for an RDF data resource.
So we change the implementation or use the '_'
character instead.
Shall i update the bug with this info?
>> The global address book container could be represented
>> as:
>> abbsdirectory://
>>
>> An account specific address book container could be
>> represented as:
>>
>> abbsdirectory://MailAccount1
>>
>> This data resource is responsible for creating/deleting
>> and instantiating address books from the prefs.js
>> for global or account address books.
>> Thus clients can listen for changes on the resource and
>> the RDF directory data source can easily be used in
>> aggregation, for example in a mail news pane.
>
>OK, that makes some sense. Note that you don't necessarily need to
>use RDF to get be able to wait for notifications about things
>happening -- alternately, you could use nsIObserver and friends. I'm
>just thinking out loud here -- there's not necessarily anything wrong
>with using RDF for this.
>
Ok.
Currently the RDF directory data source listens
to changes performed by RDF directory data resources
using nsIAddrBookSession.idl interface, which
is a bit like the nsIObserverService, and the
nsIAbListener, which is like the nsIObserver.
Paul.
| ? + ? = To question
----------------\
Paul Sandoz
x19219
+353-1-8199219