diff options
author | Matt A. Tobin <email@mattatobin.com> | 2019-11-03 00:17:46 -0400 |
---|---|---|
committer | Matt A. Tobin <email@mattatobin.com> | 2019-11-03 00:17:46 -0400 |
commit | 302bf1b523012e11b60425d6eee1221ebc2724eb (patch) | |
tree | b191a895f8716efcbe42f454f37597a545a6f421 /ldap/xpcom/public/nsILDAPConnection.idl | |
parent | 21b3f6247403c06f85e1f45d219f87549862198f (diff) | |
download | UXP-302bf1b523012e11b60425d6eee1221ebc2724eb.tar UXP-302bf1b523012e11b60425d6eee1221ebc2724eb.tar.gz UXP-302bf1b523012e11b60425d6eee1221ebc2724eb.tar.lz UXP-302bf1b523012e11b60425d6eee1221ebc2724eb.tar.xz UXP-302bf1b523012e11b60425d6eee1221ebc2724eb.zip |
Issue #1258 - Part 1: Import mailnews, ldap, and mork from comm-esr52.9.1
Diffstat (limited to 'ldap/xpcom/public/nsILDAPConnection.idl')
-rw-r--r-- | ldap/xpcom/public/nsILDAPConnection.idl | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/ldap/xpcom/public/nsILDAPConnection.idl b/ldap/xpcom/public/nsILDAPConnection.idl new file mode 100644 index 000000000..63b367363 --- /dev/null +++ b/ldap/xpcom/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 occured 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); +}; |