summaryrefslogtreecommitdiffstats
path: root/comm/mailnews/addrbook/public/nsILDAPMessageListener.idl
diff options
context:
space:
mode:
Diffstat (limited to 'comm/mailnews/addrbook/public/nsILDAPMessageListener.idl')
-rw-r--r--comm/mailnews/addrbook/public/nsILDAPMessageListener.idl48
1 files changed, 48 insertions, 0 deletions
diff --git a/comm/mailnews/addrbook/public/nsILDAPMessageListener.idl b/comm/mailnews/addrbook/public/nsILDAPMessageListener.idl
new file mode 100644
index 0000000000..2907840df5
--- /dev/null
+++ b/comm/mailnews/addrbook/public/nsILDAPMessageListener.idl
@@ -0,0 +1,48 @@
+/* -*- 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 nsILDAPMessage;
+interface nsILDAPConnection;
+interface nsITransportSecurityInfo;
+
+/**
+ * A callback interface to be implemented by any objects that want to
+ * receive results from an nsILDAPOperation (ie nsILDAPMessages) as they
+ * come in.
+ */
+[scriptable, uuid(dc721d4b-3ff2-4387-a80c-5e29545f774a)]
+interface nsILDAPMessageListener : nsISupports
+{
+ /**
+ * Invoked when Init has completed successfully LDAP operations can
+ * proceed.
+ */
+ void onLDAPInit();
+
+ /**
+ * Messages from LDAP operations are passed back via this function.
+ *
+ * @param aMessage The message that was returned, NULL if none was.
+ *
+ * XXX semantics of NULL?
+ */
+ void onLDAPMessage(in nsILDAPMessage aMessage);
+
+
+ /**
+ * Indicates that an error has occurred - either during init, or due to
+ * an LDAP operation.
+ *
+ * @param status The error code.
+ * @param secInfo The securityInfo object for the connection, if status
+ * is a security (NSS) error. Null otherwise.
+ * @param location If status is an NSS error code, this holds the location
+ * of the failed operation ("<host>:<port>").
+ */
+ void onLDAPError(in nsresult status, in nsITransportSecurityInfo secInfo, in ACString location);
+};