Re: Issues with LDAP XPCOM API in Thunderbird

Mark Banner <[email protected]>
Newsgroups gmane.comp.mozilla.devel.directory
Message-ID <[email protected]>
[email protected] wrote:
> Hello,
> 
> I'm trying to use the LDAP API in Thunderbird to make a non-anonymous,
> password-enabled, search -- which is not possible with
> nsILDAPSyncQuery AFAIK.

I expect that's mainly because that interface has been designed for the 
autoconfig setup and not general directory searching.

> So I played a bit with the low-level API, i.e. nsILDAPConnection,
> nsILDAPOperation and nsILDAPMessageListener in particular.
> I didn't go very far as calling nsILDAPOperation.simpleBind()
> constantly threw a 0x8059005b error.

That's some sort of connection error, see:

http://mxr.mozilla.org/seamonkey/source/directory/xpcom/base/public/nsILDAPErrors.idl

Take the last two digits from the error code and look them up there.

> Any idea why ? Has anyone succeeded in using this API in Thunderbird ?

The address book in Thunderbird uses it all the time. See:

http://mxr.mozilla.org/seamonkey/source/mailnews/addrbook/src/nsAbLDAPListenerBase.cpp#240

and you'll probably want to know about:

http://mxr.mozilla.org/seamonkey/source/mailnews/addrbook/src/nsAbLDAPDirectoryQuery.cpp 
as that drives the nsAbLDAPListenerBase.

Note that the trunk code (which I've given links to) has some 
significant improvements (and hence changes) in that area however, both 
trunk and branch effectively function the same in talking to the LDAP 
XPCOM API.

Standard8
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.