michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "nsISupports.idl" michael@0: michael@0: interface nsIAuthInformation; michael@0: michael@0: /** michael@0: * Interface for callback methods for the asynchronous nsIAuthPrompt2 method. michael@0: * Callers MUST call exactly one method if nsIAuthPrompt2::promptPasswordAsync michael@0: * returns successfully. They MUST NOT call any method on this interface before michael@0: * promptPasswordAsync returns. michael@0: */ michael@0: [scriptable, uuid(bdc387d7-2d29-4cac-92f1-dd75d786631d)] michael@0: interface nsIAuthPromptCallback : nsISupports michael@0: { michael@0: /** michael@0: * Authentication information is available. michael@0: * michael@0: * @param aContext michael@0: * The context as passed to promptPasswordAsync michael@0: * @param aAuthInfo michael@0: * Authentication information. Must be the same object that was passed michael@0: * to promptPasswordAsync. michael@0: * michael@0: * @note Any exceptions thrown from this method should be ignored. michael@0: */ michael@0: void onAuthAvailable(in nsISupports aContext, michael@0: in nsIAuthInformation aAuthInfo); michael@0: michael@0: /** michael@0: * Notification that the prompt was cancelled. michael@0: * michael@0: * @param aContext michael@0: * The context that was passed to promptPasswordAsync. michael@0: * @param userCancel michael@0: * If false, this prompt was cancelled by calling the michael@0: * the cancel method on the nsICancelable; otherwise, michael@0: * it was cancelled by the user. michael@0: */ michael@0: void onAuthCancelled(in nsISupports aContext, in boolean userCancel); michael@0: }; michael@0: