1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/security/manager/ssl/public/nsIKeygenThread.idl Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,48 @@ 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 +// make sure to include all the required file headers 1.9 + 1.10 +#include "nsISupports.idl" 1.11 + 1.12 +interface nsIObserver; 1.13 + 1.14 +/** 1.15 + * nsIKeygenThread 1.16 + * This is used to communicate with the thread generating a key pair, 1.17 + * to be used by the dialog displaying status information. 1.18 + */ 1.19 +[scriptable, uuid(8712a243-5539-447c-9f47-8653f40c3a09)] 1.20 +interface nsIKeygenThread : nsISupports 1.21 +{ 1.22 + /** 1.23 + * startKeyGeneration - run the thread 1.24 + * A user interface using this interface needs to 1.25 + * call this method as soon as the status information 1.26 + * is displaying. This will trigger key generation. 1.27 + * To allow the closure of the status information, 1.28 + * the thread needs a handle to an observer. 1.29 + * 1.30 + * observer will be called on the UI thread. 1.31 + * When the key generation is done, the observe method will 1.32 + * be called with a topic of "keygen-finished" and null data 1.33 + * and subject. 1.34 + */ 1.35 + void startKeyGeneration(in nsIObserver observer); 1.36 + 1.37 + /** 1.38 + * userCanceled - notify the thread 1.39 + * If the user canceled, the thread is no longer allowed to 1.40 + * close the dialog. However, if the thread already closed 1.41 + * it, we are not allowed to close it. 1.42 + */ 1.43 + void userCanceled(out boolean threadAlreadyClosedDialog); 1.44 +}; 1.45 + 1.46 +%{ C++ 1.47 +// {195763b8-1dd2-11b2-a843-eb44e44aaa37} 1.48 +#define NS_KEYGENTHREAD_CID \ 1.49 +{ 0x195763b8, 0x1dd2, 0x11b2, { 0xa8, 0x43, 0xeb, 0x44, 0xe4, 0x4a, 0xaa, 0x37 } } 1.50 +#define NS_KEYGENTHREAD_CONTRACTID "@mozilla.org/security/keygenthread;1" 1.51 +%}