1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/netwerk/base/public/nsIAuthPromptCallback.idl Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,44 @@ 1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.6 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.7 + 1.8 +#include "nsISupports.idl" 1.9 + 1.10 +interface nsIAuthInformation; 1.11 + 1.12 +/** 1.13 + * Interface for callback methods for the asynchronous nsIAuthPrompt2 method. 1.14 + * Callers MUST call exactly one method if nsIAuthPrompt2::promptPasswordAsync 1.15 + * returns successfully. They MUST NOT call any method on this interface before 1.16 + * promptPasswordAsync returns. 1.17 + */ 1.18 +[scriptable, uuid(bdc387d7-2d29-4cac-92f1-dd75d786631d)] 1.19 +interface nsIAuthPromptCallback : nsISupports 1.20 +{ 1.21 + /** 1.22 + * Authentication information is available. 1.23 + * 1.24 + * @param aContext 1.25 + * The context as passed to promptPasswordAsync 1.26 + * @param aAuthInfo 1.27 + * Authentication information. Must be the same object that was passed 1.28 + * to promptPasswordAsync. 1.29 + * 1.30 + * @note Any exceptions thrown from this method should be ignored. 1.31 + */ 1.32 + void onAuthAvailable(in nsISupports aContext, 1.33 + in nsIAuthInformation aAuthInfo); 1.34 + 1.35 + /** 1.36 + * Notification that the prompt was cancelled. 1.37 + * 1.38 + * @param aContext 1.39 + * The context that was passed to promptPasswordAsync. 1.40 + * @param userCancel 1.41 + * If false, this prompt was cancelled by calling the 1.42 + * the cancel method on the nsICancelable; otherwise, 1.43 + * it was cancelled by the user. 1.44 + */ 1.45 + void onAuthCancelled(in nsISupports aContext, in boolean userCancel); 1.46 +}; 1.47 +