1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/security/manager/ssl/public/nsIProtectedAuthThread.idl Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,46 @@ 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 +#include "nsIObserver.idl" 1.10 +#include "nsIPKCS11Slot.idl" 1.11 + 1.12 +/** 1.13 + * nsIProtectedAuthThread 1.14 + * This is used to communicate with the thread login on to 1.15 + * a token with CKF_PROTECTED_AUTHENTICATION_PATH set. 1.16 + */ 1.17 +[scriptable, uuid(4bb27cb7-8984-4cee-8ce7-9b014c3d091b)] 1.18 +interface nsIProtectedAuthThread : nsISupports 1.19 +{ 1.20 + /** 1.21 + * login - run the thread 1.22 + * A user interface implementing this interface needs to 1.23 + * call this method as soon as the message to the user is 1.24 + * displayed. This will trigger login operation. No user 1.25 + * cancellation is possible during login operation. 1.26 + * 1.27 + * When the login is done, the observe method of @observer will 1.28 + * be called on the UI thread with a topic of "login-finished" 1.29 + * and null data and subject. 1.30 + */ 1.31 + void login(in nsIObserver observer); 1.32 + 1.33 + /** 1.34 + * The PKCS11 slot 1.35 + */ 1.36 + readonly attribute nsIPKCS11Slot slot; 1.37 + 1.38 + /** 1.39 + * Gets token to be logged in name. 1.40 + */ 1.41 + AString getTokenName(); 1.42 +}; 1.43 + 1.44 +%{ C++ 1.45 +// {45334489-3D30-47c6-920B-0A55A313AEBF} 1.46 +#define NS_PROTECTEDAUTHTHREAD_CID \ 1.47 +{ 0x45334489, 0x3d30, 0x47c6, { 0x92, 0x0b, 0x0a, 0x55, 0xa3, 0x13, 0xae, 0xbf } } 1.48 +#define NS_PROTECTEDAUTHTHREAD_CONTRACTID "@mozilla.org/security/protectedauththread;1" 1.49 +%}