/* -*- 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 nsIInterfaceRequestor;

/**
 * A mechanism to report a broken SSL connection. The recipient should NOT block.
 */
[scriptable, uuid(99f8d972-bae4-414c-b39b-47587d3ded68)]
interface nsISSLErrorListener : nsISupports {

  /**
   *  @param socketInfo A network communication context that can be used to obtain more information
   *                    about the active connection.
   *  @param error The code associated with the error.
   *  @param targetSite The Site name that was used to open the current connection.
   *
   *  @return The consumer shall return true if it wants to suppress the error message
   *          related to the error (the connection will still get canceled).
   */
  boolean notifySSLError(in nsIInterfaceRequestor socketInfo, 
                         in int32_t error,
                         in AUTF8String targetSite);
};
