/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "nsISupports.idl" interface nsILDAPOperation; interface nsILDAPMessageListener; interface nsILDAPURL; [scriptable, uuid(360c1ff7-15e3-4ffe-b4b8-0eda72ebc096)] interface nsILDAPConnection : nsISupports { /** * the string version of lderrno */ readonly attribute wstring errorString; /** * DN to bind as. use the init() method to set this. * * @exception NS_ERROR_OUT_OF_MEMORY */ readonly attribute AUTF8String bindName; /** * private parameter (anything caller desires) */ attribute nsISupports closure; /** * Set up the connection. Note that init() must be called on a thread * that already has an nsIEventQueue. * * @param aUrl A URL for the ldap server. The host, port and * ssl connection type will be extracted from this * @param aBindName DN to bind as * @param aMessageListener Callback for DNS resolution completion */ void init(in nsILDAPURL aUrl, in AUTF8String aBindName, in nsILDAPMessageListener aMessageListener); /** * Get information about the last error that occurred on this connection. * * @param matched if the server is returning LDAP_NO_SUCH_OBJECT, * LDAP_ALIAS_PROBLEM, LDAP_INVALID_DN_SYNTAX, * or LDAP_ALIAS_DEREF_PROBLEM, this will contain * the portion of DN that matches the entry that is * closest to the requested entry * * @param s additional error information from the server * * @return the error code, as defined in nsILDAPErrors.idl */ long getLdErrno(out AUTF8String matched, out AUTF8String s); };