From 6bf0a5cb5034a7e684dcc3500e841785237ce2dd Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 19:32:43 +0200 Subject: Adding upstream version 1:115.7.0. Signed-off-by: Daniel Baumann --- .../mailnews/addrbook/public/nsILDAPConnection.idl | 77 ++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 comm/mailnews/addrbook/public/nsILDAPConnection.idl (limited to 'comm/mailnews/addrbook/public/nsILDAPConnection.idl') diff --git a/comm/mailnews/addrbook/public/nsILDAPConnection.idl b/comm/mailnews/addrbook/public/nsILDAPConnection.idl new file mode 100644 index 0000000000..5fb44dd67c --- /dev/null +++ b/comm/mailnews/addrbook/public/nsILDAPConnection.idl @@ -0,0 +1,77 @@ +/* -*- 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; + +%{C++ +#define NS_LDAPCONNECTION_CONTRACTID "@mozilla.org/network/ldap-connection;1" +%} + +[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 + * @param aClosure private parameter (anything caller desires) + * @param aVersion LDAP version to use (currently VERSION2 or + * VERSION3) + * + * @exception NS_ERROR_ILLEGAL_VALUE null pointer or invalid version + * @exception NS_ERROR_OUT_OF_MEMORY ran out of memory + * @exception NS_ERROR_OFFLINE we are in off-line mode + * @exception NS_ERROR_FAILURE + * @exception NS_ERROR_UNEXPECTED internal error + */ + void init(in nsILDAPURL aUrl, + in AUTF8String aBindName, + in nsILDAPMessageListener aMessageListener, + in nsISupports aClosure, in unsigned long aVersion); + + const unsigned long VERSION2 = 2; + const unsigned long VERSION3 = 3; + + /** + * 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); +}; -- cgit v1.2.3