summaryrefslogtreecommitdiffstats
path: root/comm/mailnews/addrbook/public/nsIAbDirSearchListener.idl
diff options
context:
space:
mode:
Diffstat (limited to 'comm/mailnews/addrbook/public/nsIAbDirSearchListener.idl')
-rw-r--r--comm/mailnews/addrbook/public/nsIAbDirSearchListener.idl40
1 files changed, 40 insertions, 0 deletions
diff --git a/comm/mailnews/addrbook/public/nsIAbDirSearchListener.idl b/comm/mailnews/addrbook/public/nsIAbDirSearchListener.idl
new file mode 100644
index 0000000000..cc78f1137f
--- /dev/null
+++ b/comm/mailnews/addrbook/public/nsIAbDirSearchListener.idl
@@ -0,0 +1,40 @@
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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 nsIAbCard;
+interface nsITransportSecurityInfo;
+
+/**
+ * Listener callbacks for addressbook nsIAbDirectory searches and queries.
+ */
+[scriptable, uuid(eafe2488-4efb-4ac8-a6b4-7756eb1650a3)]
+interface nsIAbDirSearchListener : nsISupports {
+ /**
+ * Invoked for each matching result found by the search.
+ *
+ * @param aCard A matching addressbook card.
+ */
+ void onSearchFoundCard(in nsIAbCard aCard);
+
+ /**
+ * Invoked when the search finishes.
+ *
+ * @param status The result of the search. NS_OK means the search
+ * completed without error. NS_ERROR_ABORT means the user
+ * stopped the search. But there are many other error codes
+ * which may be seen here (LDAP or NSS errors, for example).
+ * @param complete Whether this search returned all possible results.
+ * @param secInfo If status is an NSS error code, the securityInfo of the
+ * failing operation is passed out here. This can be used
+ * to obtain a failing certificate, to present the user an
+ * option to add it as a security exception (handy for
+ * LDAP servers with self-signed certs).
+ * @param location If status is an NSS error code, this holds the location
+ * of the failed operation ("<host>:<port>").
+ */
+ void onSearchFinished(in nsresult status, in bool complete, in nsITransportSecurityInfo secInfo, in ACString location);
+};