Hi!
I'm still stuck at this problem. Could you please give me some pointers?
Thanks! --leo
On 01/24/2005 12:27 AM, Alexander Bergolth wrote:
On 01/22/05 02:58, Dan Mosedale wrote:Alexander Bergolth wrote:
I'd like to do a syncronous LDAP query in my Thunderbird extension.
Is there any example JavaScript code for this?
I've tried to use the @mozilla.org/ldapsyncquery;1 component but this component doesn't seem to be avaliable in thunderbird.
At some point, I should move the ldapsyncquery code into the XPCOM SDK, but it requires some factoring first, iirc.
Is there any way to use the async searchExt method of the nsILDAPOperation to implement synchronous queries? (E.g. Kick off an async search request and wait for the result message.) Is there any documentation / example code on how to achieve this?
I suppose you could reimplement the algorithm in ldapsyncquery in JS. However, in general, I've found that most ldap stuff is pretty reasonable to solve with an async algorithm. If you can post explaining what you're trying to accomplish, I might be able to suggest an alternative solution.
My extension should query an ldap-server at thunderbird-startup if the user's email-settings are not yet configured. Based on the USER (or USERNAME) environment variable, the local ldap directory should be used to automatically configure the client. Therefore thunderbirds startup should wait until the results of the query arrive. So I guess an asynchronous simulation of a sync query would be the right thing to do.
Unfortunately I have no idea how to accomplish that. :(
_______________________________________________ Mozilla-xpcom mailing list [email protected] http://mail.mozilla.org/listinfo/mozilla-xpcom
