summaryrefslogtreecommitdiffstats
path: root/comm/mailnews/addrbook/public/nsILDAPMessageListener.idl
blob: 2907840df5062e061c417dbb5e3ac025929a7ad3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
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);
};